first commit

This commit is contained in:
2025-11-06 11:08:59 +01:00
commit 3c5117c2c3
85 changed files with 13275 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
const express = require('express');
const router = express.Router();
const {
submitFeedback,
getFeedback,
getFeedbackList,
processFeedback,
getFeedbackStats
} = require('../controllers/feedbackController');
const { authenticate, authorize } = require('../middleware/auth');
const { validate, schemas } = require('../middleware/validation');
// All feedback routes require authentication
router.use(authenticate);
// Feedback submission (public to authenticated users)
router.post('/submit', validate(schemas.submitFeedback), submitFeedback);
// Feedback management (admin only)
router.get('/stats', authorize('admin'), getFeedbackStats);
router.get('/', authorize('admin'), getFeedbackList);
router.get('/:feedbackId', authorize('admin'), getFeedback);
router.put('/:feedbackId/process', authorize('admin'), processFeedback);
module.exports = router;