MCPcopy Create free account
hub / github.com/ShipSecAI/studio / create

Method create

backend/src/api-keys/api-keys.controller.ts:52–62  ·  view source on GitHub ↗
(
    @CurrentAuth() auth: AuthContext,
    @Body(new ZodValidationPipe(CreateApiKeySchema)) dto: CreateApiKeyDto,
  )

Source from the content-addressed store, hash-verified

50 @Roles('ADMIN')
51 @ApiCreatedResponse({ type: CreateApiKeyResponseDto })
52 async create(
53 @CurrentAuth() auth: AuthContext,
54 @Body(new ZodValidationPipe(CreateApiKeySchema)) dto: CreateApiKeyDto,
55 ) {
56 const { apiKey, plainKey } = await this.apiKeysService.create(auth, dto);
57 // Return the response DTO plus the plain key (one-time only)
58 return {
59 ...ApiKeyResponseDto.create(apiKey),
60 plainKey,
61 };
62 }
63
64 @Get(':id')
65 @ApiOkResponse({ type: ApiKeyResponseDto })

Callers 4

listMethod · 0.45
getMethod · 0.45
updateMethod · 0.45
revokeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected