MCPcopy Create free account
hub / github.com/monkeytypegame/monkeytype / getApeKeys

Function getApeKeys

backend/src/api/controllers/ape-key.ts:23–34  ·  view source on GitHub ↗
(
  req: MonkeyRequest,
)

Source from the content-addressed store, hash-verified

21}
22
23export async function getApeKeys(
24 req: MonkeyRequest,
25): Promise<GetApeKeyResponse> {
26 const { uid } = req.ctx.decodedToken;
27
28 const apeKeys = await ApeKeysDAL.getApeKeys(uid);
29 const cleanedKeys: Record<string, ApeKey> = Object.fromEntries(
30 apeKeys.map((item) => [item._id.toHexString(), cleanApeKey(item)]),
31 );
32
33 return new MonkeyResponse("ApeKeys retrieved", cleanedKeys);
34}
35
36export async function generateApeKey(
37 req: MonkeyRequest<undefined, AddApeKeyRequest>,

Callers

nothing calls this directly

Calls 1

cleanApeKeyFunction · 0.85

Tested by

no test coverage detected