const express = require('express');
const router = express.Router();
const verifyToken = require('../middlewares/verifyToken');
const {
    getAllSubmissions,
    getSubmissionById,
    getSubmissionMedia,
    createSubmission,
    updateSubmission,
    deleteSubmission
} = require('../controllers/submissionsController');

router.get('/', verifyToken, getAllSubmissions);
router.get('/:id/media/:answersId/:occurrence', getSubmissionMedia);
router.get('/:id', verifyToken, getSubmissionById);
router.post('/', verifyToken, createSubmission);
router.put('/:id', verifyToken, updateSubmission);
router.delete('/:id', verifyToken, deleteSubmission);

module.exports = router;

