Files
yourpart3/backend/routers/friendshipRouter.js
Torsten Schulz (local) 1ab9407e79
All checks were successful
Deploy to production / deploy (push) Successful in 2m56s
Refactor code structure for improved readability and maintainability; optimize performance across multiple modules.
2026-07-21 09:08:15 +02:00

16 lines
635 B
JavaScript
Executable File

import { Router } from 'express';
import friendshipController from '../controllers/friendshipController.js';
import { authenticate } from '../middleware/authMiddleware.js';
const friendshipRouter = Router();
friendshipRouter.use(authenticate);
friendshipRouter.post('/end', friendshipController.endFriendship);
friendshipRouter.post('/accept', friendshipController.acceptFriendship);
friendshipRouter.post('/reject', friendshipController.rejectFriendship);
friendshipRouter.post('/withdraw', friendshipController.withdrawRequest);
friendshipRouter.get('/', friendshipController.getFriendships);
export default friendshipRouter;