TK-FB(공장관리+신고)와 M-Project(부적합관리)를 3개 독립 시스템으로 분리하기 위한 전체 코드 구조 작성. - SSO 인증 서비스 (bcrypt + pbkdf2 이중 해시 지원) - System 1: 공장관리 (TK-FB 기반, 신고 코드 제거) - System 2: 신고 (TK-FB에서 workIssue 코드 추출) - System 3: 부적합관리 (M-Project 기반) - Gateway 포털 (path-based 라우팅) - 통합 docker-compose.yml 및 배포 스크립트 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;
|