Files
TK-FB-Project/api.hyungi.net/routes/notificationRecipientRoutes.js
Hyungi Ahn b8ccde7f17 feat: 알림 시스템 및 시설설비 관리 기능 구현
- 알림 시스템 구축 (navbar 알림 아이콘, 드롭다운)
- 알림 수신자 설정 기능 (계정관리 페이지)
- 시설설비 관리 페이지 추가 (수리 워크플로우)
- 수리 신청 → 접수 → 처리중 → 완료 상태 관리
- 사이드바 메뉴 구조 개선 (공장 관리 카테고리)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 15:56:57 +09:00

29 lines
1.0 KiB
JavaScript

// routes/notificationRecipientRoutes.js
const express = require('express');
const router = express.Router();
const notificationRecipientController = require('../controllers/notificationRecipientController');
const { verifyToken, requireMinLevel } = require('../middlewares/authMiddleware');
// 모든 라우트에 인증 필요
router.use(verifyToken);
// 알림 유형 목록
router.get('/types', notificationRecipientController.getTypes);
// 전체 수신자 목록 (유형별 그룹화)
router.get('/', notificationRecipientController.getAll);
// 유형별 수신자 조회
router.get('/:type', notificationRecipientController.getByType);
// 수신자 추가 (관리자만)
router.post('/', requireMinLevel('admin'), notificationRecipientController.add);
// 유형별 수신자 일괄 설정 (관리자만)
router.put('/:type', requireMinLevel('admin'), notificationRecipientController.setRecipients);
// 수신자 제거 (관리자만)
router.delete('/:type/:userId', requireMinLevel('admin'), notificationRecipientController.remove);
module.exports = router;