From 3a2e4af733bf1a2bb6a556754935dd01b059731e Mon Sep 17 00:00:00 2001 From: Akash R Chandran Date: Sat, 11 May 2024 14:45:41 +0530 Subject: [PATCH] updated --- src/app/api/questions/route.ts | 6 +++--- src/components/forms/QuizCreation.tsx | 8 ++++---- src/schemas/form/quiz.ts | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/app/api/questions/route.ts b/src/app/api/questions/route.ts index 19e81d8..0736ec7 100644 --- a/src/app/api/questions/route.ts +++ b/src/app/api/questions/route.ts @@ -20,7 +20,7 @@ export async function POST(req: Request, res: Response) { const { count, context, type, model } = quizFormSchema.parse(body); let questions: any; let topic: any; - if (type === "fib" && model === "prepportal") { + if (type === "fib" && model === "MMQG-T") { const response = await axios.post( `${process.env.BACKEND_URL as string}/generate`, { @@ -45,7 +45,7 @@ export async function POST(req: Request, res: Response) { } ); topic = questions[0].topic; - } else if (type === "mcq" && model === "prepportal") { + } else if (type === "mcq" && model === "MMQG-T") { const response = await axios.post( `${process.env.BACKEND_URL as string}/generate`, { @@ -73,7 +73,7 @@ export async function POST(req: Request, res: Response) { } ); topic = questions[0].topic; - } else if (type === "truefalse" && model === "prepportal") { + } else if (type === "truefalse" && model === "MMQG-T") { const response = await axios.post( `${process.env.BACKEND_URL as string}/generate`, { diff --git a/src/components/forms/QuizCreation.tsx b/src/components/forms/QuizCreation.tsx index 20f9347..7afc28f 100644 --- a/src/components/forms/QuizCreation.tsx +++ b/src/components/forms/QuizCreation.tsx @@ -73,7 +73,7 @@ const QuizCreation = (props: Props) => { context: "", count: 3, type: "mcq", - model: "prepportal", + model: "MMQG-T", }, }); const { setValue } = form; @@ -195,17 +195,17 @@ const QuizCreation = (props: Props) => {