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

Function getLastResult

backend/src/dal/result.ts:71–79  ·  view source on GitHub ↗
(uid: string)

Source from the content-addressed store, hash-verified

69}
70
71export async function getLastResult(uid: string): Promise<DBResult> {
72 const lastResult = await getResultCollection().findOne(
73 { uid },
74 { sort: { timestamp: -1 } },
75 );
76
77 if (lastResult === null) throw new MonkeyError(404, "No last result found");
78 return replaceLegacyValues(lastResult);
79}
80
81export async function getLastResultTimestamp(uid: string): Promise<number> {
82 const lastResult = await getResultCollection().findOne(

Callers 3

extraStreakTextFunction · 0.50
results.tsFile · 0.50
updateTagsFunction · 0.50

Calls 2

replaceLegacyValuesFunction · 0.90
getResultCollectionFunction · 0.85

Tested by

no test coverage detected