(uid: string, id: string)
| 59 | } |
| 60 | |
| 61 | export async function getResult(uid: string, id: string): Promise<DBResult> { |
| 62 | const result = await getResultCollection().findOne({ |
| 63 | _id: new ObjectId(id), |
| 64 | uid, |
| 65 | }); |
| 66 | |
| 67 | if (!result) throw new MonkeyError(404, "Result not found"); |
| 68 | return replaceLegacyValues(result); |
| 69 | } |
| 70 | |
| 71 | export async function getLastResult(uid: string): Promise<DBResult> { |
| 72 | const lastResult = await getResultCollection().findOne( |
nothing calls this directly
no test coverage detected