Skip to content

Commit

Permalink
💄
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanp413 committed Nov 23, 2023
1 parent 613ee48 commit 11bd75d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion components/dashboard/src/service/json-rpc-ssh-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class JsonRpcSSHClient implements PromiseClient<typeof SSHService> {
throw new ApplicationError(ErrorCodes.BAD_REQUEST, "sshKeyId is required");
}

await getGitpodService().server.deleteSSHPublicKey(eq.sshKeyId);
await getGitpodService().server.deleteSSHPublicKey(req.sshKeyId);

const response = new DeleteSSHPublicKeyResponse();
return response;
Expand Down
7 changes: 7 additions & 0 deletions components/server/src/api/ssh-service-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ export class SSHServiceAPI implements ServiceImpl<typeof SSHServiceInterface> {
}

async createSSHPublicKey(req: CreateSSHPublicKeyRequest, _: HandlerContext): Promise<CreateSSHPublicKeyResponse> {
if (!req.name) {
throw new ApplicationError(ErrorCodes.BAD_REQUEST, "name is required");
}
if (!req.key) {
throw new ApplicationError(ErrorCodes.BAD_REQUEST, "key is required");
}

const response = new CreateSSHPublicKeyResponse();

const result = await this.sshKeyService.addSSHPublicKey(ctxUserId(), ctxUserId(), {
Expand Down

0 comments on commit 11bd75d

Please sign in to comment.