MCPcopy Create free account
hub / github.com/QuantiaAI/helm-agents / update

Method update

apps/api/src/keys/keys.controller.ts:22–32  ·  view source on GitHub ↗
(
    @CurrentUser() user: AuthUser,
    @Body() body: { env?: unknown; value?: unknown },
  )

Source from the content-addressed store, hash-verified

20 /** Set or clear one of this user's provider API keys (by env var name). */
21 @Put()
22 update(
23 @CurrentUser() user: AuthUser,
24 @Body() body: { env?: unknown; value?: unknown },
25 ): KeysUpdateResponse {
26 if (typeof body.env !== "string" || typeof body.value !== "string") {
27 throw new BadRequestException({ error: "env and value are required" });
28 }
29 this.keys.setByEnv(user.id, body.env, body.value);
30 this.engine.invalidate(user.id);
31 return { ok: true, keys: this.keys.listMasked(user.id) };
32 }
33}

Callers

nothing calls this directly

Calls 3

invalidateMethod · 0.80
setByEnvMethod · 0.45
listMaskedMethod · 0.45

Tested by

no test coverage detected