From e8cc084c2957b2d994487c308c3113bd30d48810 Mon Sep 17 00:00:00 2001
From: HUSS THEOPHILE <theophile.huss@etu.unistra.fr>
Date: Fri, 6 Dec 2024 15:33:11 +0000
Subject: [PATCH] fix: send categorie in creation quiz

---
 .../form-quiz/form-create-quiz/form-create-quiz.component.ts    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/app/modules/home/form-quiz/form-create-quiz/form-create-quiz.component.ts b/src/app/modules/home/form-quiz/form-create-quiz/form-create-quiz.component.ts
index 294fc64..bd71a32 100644
--- a/src/app/modules/home/form-quiz/form-create-quiz/form-create-quiz.component.ts
+++ b/src/app/modules/home/form-quiz/form-create-quiz/form-create-quiz.component.ts
@@ -45,7 +45,7 @@ export class FormCreateQuizComponent implements OnInit {
                     const categories = this.form.value.category;
                     const difficulty = this.form.value.difficulty;
                     const NbQuestion = this.form.value.nbQuestion;
-                    this.questionService.createQuiz(NbQuestion, categories.id, difficulty).subscribe({
+                    this.questionService.createQuiz(NbQuestion, Number(categories), difficulty).subscribe({
                         next: (data: any) => {
                             this.router.navigate(['/play-quiz'], { queryParams: { idQuiz: data.id } });
                         },
-- 
GitLab