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

Function getUser

backend/src/dal/user.ts:251–255  ·  view source on GitHub ↗
(uid: string, stack: string)

Source from the content-addressed store, hash-verified

249}
250
251export async function getUser(uid: string, stack: string): Promise<DBUser> {
252 const user = await getUsersCollection().findOne({ uid });
253 if (!user) throw new MonkeyError(404, "User not found", stack);
254 return migrateUser(user);
255}
256
257/**
258 * Get user document only containing requested fields

Callers 1

addResultFunction · 0.90

Calls 2

getUsersCollectionFunction · 0.85
migrateUserFunction · 0.85

Tested by

no test coverage detected