Skip to content
Snippets Groups Projects
Commit f7b3acd8 authored by Wo-ogie's avatar Wo-ogie
Browse files

refactor: participant router의 base endpoint 수정

parent f9fe2c5f
No related branches found
No related tags found
No related merge requests found
...@@ -49,7 +49,7 @@ app.use( ...@@ -49,7 +49,7 @@ app.use(
); );
app.use('/meetings', meetingRouter); app.use('/meetings', meetingRouter);
app.use('/meetings', participantRouter); app.use('/meetings/:meetingId/participants', participantRouter);
app.use((req, res, next) => { app.use((req, res, next) => {
const error = new Error(`There is no router. ${req.method} ${req.url}`); const error = new Error(`There is no router. ${req.method} ${req.url}`);
......
...@@ -6,14 +6,14 @@ const { ...@@ -6,14 +6,14 @@ const {
getParticipantExistence, getParticipantExistence,
} = require('../controllers/participant'); } = require('../controllers/participant');
const router = express.Router(); const router = express.Router({ mergeParams: true });
router.post('/:meetingId/participants', createParticipant); router.post('/', createParticipant);
router.get('/:meetingId/participants', getParticipantByName); router.get('/', getParticipantByName);
router.get('/:meetingId/participants/:participantId', getParticipantById); router.get('/:participantId', getParticipantById);
router.get('/:meetingId/participants/existence', getParticipantExistence); router.get('/existence', getParticipantExistence);
module.exports = router; module.exports = router;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment