Erster Aufbau Forum

This commit is contained in:
Torsten Schulz
2024-10-15 16:28:42 +02:00
parent c31be3f879
commit 663564aa96
163 changed files with 9449 additions and 116 deletions

View File

@@ -0,0 +1,15 @@
import { Router } from 'express';
import forumController from '../controllers/forumController.js';
import { authenticate } from '../middleware/authMiddleware.js';
const forumRouter = Router();
forumRouter.use(authenticate);
forumRouter.post('/topic', forumController.createTopic);
forumRouter.post('/', forumController.createForum);
forumRouter.delete('/:forumId', forumController.deleteForum);
forumRouter.get('/:forumId/:page', forumController.getForum);
forumRouter.get('/', forumController.getAllForums);
export default forumRouter;

View File

@@ -24,8 +24,8 @@ router.get('/guestbook/entries/:username/:page', authenticate, socialNetworkCont
router.delete('/guestbook/entries/:entryId', authenticate, socialNetworkController.deleteGuestbookEntry);
router.get('/guestbook/image/:guestbookUserName/:entryId', authenticate, socialNetworkController.getGuestbookImage);
router.post('/diary', authenticate, socialNetworkController.createDiaryEntry);
router.put('/diary/:diaryId', authenticate, socialNetworkController.updateDiaryEntry);
router.delete('/diary/:diaryId', authenticate, socialNetworkController.deleteDiaryEntry);
router.get('/diary/:userId', authenticate, socialNetworkController.getDiaryEntries);
router.put('/diary/:diaryEntryId', authenticate, socialNetworkController.updateDiaryEntry);
router.delete('/diary/:entryId', authenticate, socialNetworkController.deleteDiaryEntry);
router.get('/diary/:page', authenticate, socialNetworkController.getDiaryEntries);
export default router;