fix: lint

This commit is contained in:
Gabriellvl 2025-05-09 18:20:06 +02:00
parent c13788f269
commit a5e4f2437b
4 changed files with 5 additions and 5 deletions

View file

@ -1,6 +1,6 @@
import express from 'express';
import { createAnswerHandler, deleteAnswerHandler, getAnswerHandler, getAllAnswersHandler, updateAnswerHandler } from '../controllers/answers.js';
import {adminOnly, authenticatedOnly, teachersOnly} from '../middleware/auth/checks/auth-checks.js';
import { authenticatedOnly, teachersOnly } from '../middleware/auth/checks/auth-checks.js';
import { onlyAllowAuthor, onlyAllowAuthorRequestAnswer, onlyAllowIfHasAccessToQuestion } from '../middleware/auth/checks/question-checks.js';
const router = express.Router({ mergeParams: true });

View file

@ -1,7 +1,7 @@
import express from 'express';
import { createQuestionHandler, deleteQuestionHandler, getAllQuestionsHandler, getQuestionHandler } from '../controllers/questions.js';
import answerRoutes from './answers.js';
import {adminOnly, authenticatedOnly, studentsOnly} from '../middleware/auth/checks/auth-checks.js';
import { authenticatedOnly, studentsOnly } from '../middleware/auth/checks/auth-checks.js';
import { updateAnswerHandler } from '../controllers/answers.js';
import { onlyAllowAuthor, onlyAllowAuthorRequest, onlyAllowIfHasAccessToQuestion } from '../middleware/auth/checks/question-checks.js';
@ -12,7 +12,7 @@ const router = express.Router({ mergeParams: true });
// Root endpoint used to search objects
router.get('/', authenticatedOnly, getAllQuestionsHandler);
router.post('/', studentsOnly, onlyAllowAuthor, createQuestionHandler); // TODO part of group
router.post('/', studentsOnly, onlyAllowAuthor, createQuestionHandler);
// Information about a question with id
router.get('/:seq', onlyAllowIfHasAccessToQuestion, getQuestionHandler);