feat: submission route post delete
This commit is contained in:
parent
911e17771f
commit
d9eb8def72
6 changed files with 100 additions and 17 deletions
|
@ -12,7 +12,7 @@ router.get('/:groupid', getGroupHandler);
|
|||
router.get('/:groupid', getGroupSubmissionsHandler);
|
||||
|
||||
// The list of questions a group has made
|
||||
router.get('/:id/question', (req, res) => {
|
||||
router.get('/:id/questions', (req, res) => {
|
||||
res.json({
|
||||
questions: ['0'],
|
||||
});
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import express from 'express';
|
||||
import { getSubmissionHandler } from '../controllers/submissions.js';
|
||||
import {createSubmissionHandler, deleteSubmissionHandler, getSubmissionHandler} from '../controllers/submissions.js';
|
||||
const router = express.Router({ mergeParams: true });
|
||||
|
||||
|
||||
|
@ -11,7 +11,11 @@ router.get('/', (req, res) => {
|
|||
});
|
||||
});
|
||||
|
||||
router.post('/:id', createSubmissionHandler);
|
||||
|
||||
// Information about an submission with id 'id'
|
||||
router.get('/:id', getSubmissionHandler);
|
||||
|
||||
router.delete('/:id', deleteSubmissionHandler);
|
||||
|
||||
export default router;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue