diff --git a/controllers/gameTypeController.js b/controllers/gameTypeController.js index aafa3f8..b465c10 100644 --- a/controllers/gameTypeController.js +++ b/controllers/gameTypeController.js @@ -505,11 +505,11 @@ class GameTypeController { if (category === '1') { // Quiz if (questionType === 'text') { - sample.question = { text: 'What is the capital of France?' }; + sample.question = 'What is the capital of France?'; } else if (questionType === 'image') { - sample.question = { image: 'https://example.com/question.jpg' }; + sample.question = 'image'; } else { - sample.question = { audio: 'https://example.com/question.mp3' }; + sample.question = 'audio'; } // Generate options @@ -542,9 +542,9 @@ class GameTypeController { if (questionType === 'text') { sample.question = 'Sắp xếp các chữ cái để tạo thành tên con vật'; } else if (questionType === 'image') { - sample.question = 'https://example.com/question_hint.jpg'; + sample.question = 'image'; } else { - sample.question = 'https://example.com/question_hint.mp3'; + sample.question = 'audio'; } // Full answer array @@ -594,8 +594,8 @@ class GameTypeController { } else if (category === '3') { // Instruction/hint is text sample.question = questionType === optionType ? - { instruction: 'Flip and match pairs of cards' } : - { instruction: 'Match items from two groups' }; + 'Flip and match pairs of cards' : + 'Match items from two groups'; // Memory/Matching for (let i = 0; i < parseInt(count); i++) { @@ -645,7 +645,7 @@ class GameTypeController { } else if (category === '4') { // Lesson Card - Always return all 4 fields (context, audio, image, meaning) - sample.question = { instruction: 'Learn vocabulary with context, audio, image, and meaning' }; + sample.question = 'Learn vocabulary with context, audio, image, and meaning'; sample.options = []; const contexts = [ @@ -693,9 +693,9 @@ class GameTypeController { if (questionType === 'text') { sample.question = 'Sắp xếp các từ để tạo thành câu hoàn chỉnh'; } else if (questionType === 'image') { - sample.question = 'https://example.com/sentence_question.jpg'; + sample.question = 'image'; } else { - sample.question = 'https://example.com/sentence_question.mp3'; + sample.question = 'audio'; } // Full answer array (words instead of letters)