Some changes
This commit is contained in:
10
backend/routes/activityRoutes.js
Normal file
10
backend/routes/activityRoutes.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import express from 'express';
|
||||
import { addActivity, getActivities } from '../controllers/activityController.js';
|
||||
import { authenticate } from '../middleware/authMiddleware.js';
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
router.post('/add', authenticate, addActivity);
|
||||
router.get('/:diaryDateId', authenticate, getActivities);
|
||||
|
||||
export default router;
|
||||
11
backend/routes/participantRoutes.js
Normal file
11
backend/routes/participantRoutes.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import express from 'express';
|
||||
import { getParticipants, addParticipant, removeParticipant } from '../controllers/participantController.js';
|
||||
import { authenticate } from '../middleware/authMiddleware.js';
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
router.get('/:dateId', authenticate, getParticipants);
|
||||
router.post('/add', authenticate, addParticipant);
|
||||
router.post('/remove', authenticate, removeParticipant);
|
||||
|
||||
export default router;
|
||||
Reference in New Issue
Block a user