Skip to content

Commit 5db20a7

Browse files
authored
[server] hook verification API service (#19193)
1 parent 4c3eb7d commit 5db20a7

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

components/server/src/api/server.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ import { SCMService } from "@gitpod/public-api/lib/gitpod/v1/scm_connect";
5757
import { SSHService } from "@gitpod/public-api/lib/gitpod/v1/ssh_connect";
5858
import { PrebuildServiceAPI } from "./prebuild-service-api";
5959
import { PrebuildService } from "@gitpod/public-api/lib/gitpod/v1/prebuild_connect";
60+
import { VerificationServiceAPI } from "./verification-service-api";
61+
import { VerificationService } from "@gitpod/public-api/lib/gitpod/v1/verification_connect";
6062

6163
decorate(injectable(), PublicAPIConverter);
6264

@@ -84,6 +86,7 @@ export class API {
8486
@inject(UserService) private readonly userService: UserService;
8587
@inject(BearerAuth) private readonly bearerAuthenticator: BearerAuth;
8688
@inject(PrebuildServiceAPI) private readonly prebuildServiceApi: PrebuildServiceAPI;
89+
@inject(VerificationServiceAPI) private readonly verificationServiceApi: VerificationServiceAPI;
8790

8891
listenPrivate(): http.Server {
8992
const app = express();
@@ -133,6 +136,7 @@ export class API {
133136
service(SCMService, this.scmServiceAPI),
134137
service(SSHService, this.sshServiceApi),
135138
service(PrebuildService, this.prebuildServiceApi),
139+
service(VerificationService, this.verificationServiceApi),
136140
]) {
137141
router.service(type, new Proxy(impl, this.interceptService(type)));
138142
}
@@ -387,6 +391,7 @@ export class API {
387391
bind(SSHServiceAPI).toSelf().inSingletonScope();
388392
bind(StatsServiceAPI).toSelf().inSingletonScope();
389393
bind(PrebuildServiceAPI).toSelf().inSingletonScope();
394+
bind(VerificationServiceAPI).toSelf().inSingletonScope();
390395
bind(API).toSelf().inSingletonScope();
391396
}
392397
}

components/server/src/api/teams.spec.db.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import { ContextService } from "../workspace/context-service";
3434
import { ContextParser } from "../workspace/context-parser-service";
3535
import { SSHKeyService } from "../user/sshkey-service";
3636
import { PrebuildManager } from "../prebuilds/prebuild-manager";
37+
import { VerificationService } from "../auth/verification-service";
3738

3839
const expect = chai.expect;
3940

@@ -65,6 +66,7 @@ export class APITeamsServiceSpec {
6566
this.container.bind(ContextParser).toConstantValue({} as ContextParser);
6667
this.container.bind(SSHKeyService).toConstantValue({} as SSHKeyService);
6768
this.container.bind(PrebuildManager).toConstantValue({} as PrebuildManager);
69+
this.container.bind(VerificationService).toConstantValue({} as VerificationService);
6870

6971
// Clean-up database
7072
const typeorm = testContainer.get<TypeORM>(TypeORM);

0 commit comments

Comments
 (0)