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

Method update

backend/src/api-keys/api-keys.service.ts:94–113  ·  view source on GitHub ↗
(auth: AuthContext, id: string, dto: UpdateApiKeyDto)

Source from the content-addressed store, hash-verified

92 }
93
94 async update(auth: AuthContext, id: string, dto: UpdateApiKeyDto) {
95 if (!auth.organizationId) {
96 throw new NotFoundException('API key not found');
97 }
98
99 const [apiKey] = await this.db
100 .update(apiKeys)
101 .set({
102 ...dto,
103 updatedAt: new Date(),
104 })
105 .where(and(eq(apiKeys.id, id), eq(apiKeys.organizationId, auth.organizationId)))
106 .returning();
107
108 if (!apiKey) {
109 throw new NotFoundException('API key not found');
110 }
111
112 return apiKey;
113 }
114
115 async delete(auth: AuthContext, id: string) {
116 if (!auth.organizationId) {

Callers 15

generateFindingHashFunction · 0.45
handleSubmitFunction · 0.45
handleSaveFunction · 0.45
apiKeyStore.tsFile · 0.45
secretStore.tsFile · 0.45
updateScheduleMethod · 0.45
createSessionTokenFunction · 0.45
verifySessionTokenFunction · 0.45
resolveMethod · 0.45
resolveByTokenMethod · 0.45
generateCodeChallengeMethod · 0.45

Calls 1

setMethod · 0.45

Tested by

no test coverage detected