(id: string, data: MCQQuestion)
| 385 | } |
| 386 | |
| 387 | export async function updateMCQ(id: string, data: MCQQuestion) { |
| 388 | try { |
| 389 | const mcq = await db.mCQQuestion.update({ |
| 390 | where: { |
| 391 | id: id, |
| 392 | }, |
| 393 | data, |
| 394 | }); |
| 395 | return mcq; |
| 396 | } catch (e) { |
| 397 | console.log(e); |
| 398 | return null; |
| 399 | } |
| 400 | } |
| 401 | |
| 402 | export async function deleteMCQ(id: string) { |
| 403 | try { |