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 294fc64b9140d18def0612a9adce72eb3150932f..bd71a324636519b5b4b1205ca3f2a6877d022f52 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 } }); },