( req: MonkeyRequest<undefined, AddQuoteRequest>, )
| 56 | } |
| 57 | |
| 58 | export 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 | |
| 70 | export async function approveQuote( |
| 71 | req: MonkeyRequest<undefined, ApproveQuoteRequest>, |
nothing calls this directly
no test coverage detected