Function
createQuizScore
(data: { userId: string; score: number; problemId: string })
Source from the content-addressed store, hash-verified
| 430 | } |
| 431 | |
| 432 | export async function createQuizScore(data: { userId: string; score: number; problemId: string }) { |
| 433 | const submission = await db.quizScore.create({ |
| 434 | data, |
| 435 | }); |
| 436 | return submission; |
| 437 | } |
| 438 | |
| 439 | export async function getQuizScore({ userId, problemId }: { userId: string; problemId: string }) { |
| 440 | const value = await cache.get("getQuizScore", [userId.toString(), problemId.toString()]); |
Tested by
no test coverage detected