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

Function addQuote

backend/src/api/controllers/quote.ts:58–68  ·  view source on GitHub ↗
(
  req: MonkeyRequest<undefined, AddQuoteRequest>,
)

Source from the content-addressed store, hash-verified

56}
57
58export async function addQuote(
59 req: MonkeyRequest<undefined, AddQuoteRequest>,
60): Promise<MonkeyResponse> {
61 const { uid } = req.ctx.decodedToken;
62 const { text, source, language, captcha } = req.body;
63
64 await verifyCaptcha(captcha);
65
66 await NewQuotesDAL.add(text, source, language, uid);
67 return new MonkeyResponse("Quote submission added", null);
68}
69
70export async function approveQuote(
71 req: MonkeyRequest<undefined, ApproveQuoteRequest>,

Callers

nothing calls this directly

Calls 2

verifyCaptchaFunction · 0.70
addMethod · 0.45

Tested by

no test coverage detected