Skip to content

Commit

Permalink
[server] hook verification API service (#19193)
Browse files Browse the repository at this point in the history
  • Loading branch information
akosyakov authored Dec 5, 2023
1 parent 4c3eb7d commit 5db20a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions components/server/src/api/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ import { SCMService } from "@gitpod/public-api/lib/gitpod/v1/scm_connect";
import { SSHService } from "@gitpod/public-api/lib/gitpod/v1/ssh_connect";
import { PrebuildServiceAPI } from "./prebuild-service-api";
import { PrebuildService } from "@gitpod/public-api/lib/gitpod/v1/prebuild_connect";
import { VerificationServiceAPI } from "./verification-service-api";
import { VerificationService } from "@gitpod/public-api/lib/gitpod/v1/verification_connect";

decorate(injectable(), PublicAPIConverter);

Expand Down Expand Up @@ -84,6 +86,7 @@ export class API {
@inject(UserService) private readonly userService: UserService;
@inject(BearerAuth) private readonly bearerAuthenticator: BearerAuth;
@inject(PrebuildServiceAPI) private readonly prebuildServiceApi: PrebuildServiceAPI;
@inject(VerificationServiceAPI) private readonly verificationServiceApi: VerificationServiceAPI;

listenPrivate(): http.Server {
const app = express();
Expand Down Expand Up @@ -133,6 +136,7 @@ export class API {
service(SCMService, this.scmServiceAPI),
service(SSHService, this.sshServiceApi),
service(PrebuildService, this.prebuildServiceApi),
service(VerificationService, this.verificationServiceApi),
]) {
router.service(type, new Proxy(impl, this.interceptService(type)));
}
Expand Down Expand Up @@ -387,6 +391,7 @@ export class API {
bind(SSHServiceAPI).toSelf().inSingletonScope();
bind(StatsServiceAPI).toSelf().inSingletonScope();
bind(PrebuildServiceAPI).toSelf().inSingletonScope();
bind(VerificationServiceAPI).toSelf().inSingletonScope();
bind(API).toSelf().inSingletonScope();
}
}
2 changes: 2 additions & 0 deletions components/server/src/api/teams.spec.db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import { ContextService } from "../workspace/context-service";
import { ContextParser } from "../workspace/context-parser-service";
import { SSHKeyService } from "../user/sshkey-service";
import { PrebuildManager } from "../prebuilds/prebuild-manager";
import { VerificationService } from "../auth/verification-service";

const expect = chai.expect;

Expand Down Expand Up @@ -65,6 +66,7 @@ export class APITeamsServiceSpec {
this.container.bind(ContextParser).toConstantValue({} as ContextParser);
this.container.bind(SSHKeyService).toConstantValue({} as SSHKeyService);
this.container.bind(PrebuildManager).toConstantValue({} as PrebuildManager);
this.container.bind(VerificationService).toConstantValue({} as VerificationService);

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

0 comments on commit 5db20a7

Please sign in to comment.