- 순찰/점검 기능 개선 (zone-detail 페이지 추가) - 출근/근태 시스템 개선 (연차 조회, 근무현황) - 작업분석 대분류 그룹화 및 마이그레이션 스크립트 - 모바일 네비게이션 UI 추가 - NAS 배포 도구 및 문서 추가 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
29 lines
1.0 KiB
JavaScript
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;
|