feat: answer routes en put question

This commit is contained in:
Gabriellvl 2025-04-06 23:37:54 +02:00
parent 6a1adb0ee3
commit e8e2466b76
12 changed files with 288 additions and 62 deletions

View file

@ -3,9 +3,10 @@ import {
createQuestionHandler,
deleteQuestionHandler,
getAllQuestionsHandler,
getQuestionAnswersHandler,
getQuestionHandler,
} from '../controllers/questions.js';
import answerRoutes from './answers.js';
const router = express.Router({ mergeParams: true });
// Query language
@ -20,6 +21,6 @@ router.delete('/:seq', deleteQuestionHandler);
// Information about a question with id
router.get('/:seq', getQuestionHandler);
router.get('/answers/:seq', getQuestionAnswersHandler);
router.use('/:seq/answer', answerRoutes);
export default router;