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

Function getQuotes

backend/src/api/controllers/quote.ts:33–46  ·  view source on GitHub ↗
(
  req: MonkeyRequest,
)

Source from the content-addressed store, hash-verified

31}
32
33export async function getQuotes(
34 req: MonkeyRequest,
35): Promise<GetQuotesResponse> {
36 const { uid } = req.ctx.decodedToken;
37 const quoteMod = (await getPartialUser(uid, "get quotes", ["quoteMod"]))
38 .quoteMod;
39 const quoteModLanguage = quoteMod === true ? "all" : (quoteMod as Language);
40
41 const data = await NewQuotesDAL.get(quoteModLanguage);
42 return new MonkeyResponse(
43 "Quote submissions retrieved",
44 replaceObjectIds(data),
45 );
46}
47
48export async function isSubmissionEnabled(
49 req: MonkeyRequest,

Callers

nothing calls this directly

Calls 3

getPartialUserFunction · 0.90
replaceObjectIdsFunction · 0.90
getMethod · 0.45

Tested by

no test coverage detected