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

Function getPersonalBests

backend/src/dal/user.ts:773–788  ·  view source on GitHub ↗
(
  uid: string,
  mode: string,
  mode2?: string,
)

Source from the content-addressed store, hash-verified

771}
772
773export async function getPersonalBests(
774 uid: string,
775 mode: string,
776 mode2?: string,
777): Promise<PersonalBest> {
778 const user = await getPartialUser(uid, "get personal bests", [
779 "personalBests",
780 ]);
781
782 if (mode2 !== undefined) {
783 // oxlint-disable-next-line no-unsafe-member-access
784 return user.personalBests?.[mode]?.[mode2] as PersonalBest;
785 }
786
787 return user.personalBests?.[mode] as PersonalBest;
788}
789
790export async function getStats(
791 uid: string,

Callers

nothing calls this directly

Calls 1

getPartialUserFunction · 0.85

Tested by

no test coverage detected