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

Function clearPb

backend/src/dal/user.ts:196–214  ·  view source on GitHub ↗
(uid: string)

Source from the content-addressed store, hash-verified

194}
195
196export async function clearPb(uid: string): Promise<void> {
197 await getUsersCollection().updateOne(
198 { uid },
199 {
200 $set: {
201 personalBests: {
202 time: {},
203 words: {},
204 quote: {},
205 zen: {},
206 custom: {},
207 },
208 lbPersonalBests: {
209 time: {},
210 },
211 },
212 },
213 );
214}
215
216export async function optOutOfLeaderboards(uid: string): Promise<void> {
217 await getUsersCollection().updateOne(

Callers

nothing calls this directly

Calls 1

getUsersCollectionFunction · 0.85

Tested by

no test coverage detected