74 lines
1.6 KiB
TypeScript
74 lines
1.6 KiB
TypeScript
// 배치 관리 라우트
|
|
// 작성일: 2024-12-23
|
|
|
|
import { Router } from 'express';
|
|
import { BatchController } from '../controllers/batchController';
|
|
import { authenticateToken } from '../middleware/authMiddleware';
|
|
|
|
const router = Router();
|
|
|
|
// 모든 라우트에 인증 미들웨어 적용
|
|
router.use(authenticateToken);
|
|
|
|
/**
|
|
* GET /api/batch
|
|
* 배치 작업 목록 조회
|
|
*/
|
|
router.get('/', BatchController.getBatchJobs);
|
|
|
|
/**
|
|
* GET /api/batch/:id
|
|
* 배치 작업 상세 조회
|
|
*/
|
|
router.get('/:id', BatchController.getBatchJobById);
|
|
|
|
/**
|
|
* POST /api/batch
|
|
* 배치 작업 생성
|
|
*/
|
|
router.post('/', BatchController.createBatchJob);
|
|
|
|
/**
|
|
* PUT /api/batch/:id
|
|
* 배치 작업 수정
|
|
*/
|
|
router.put('/:id', BatchController.updateBatchJob);
|
|
|
|
/**
|
|
* DELETE /api/batch/:id
|
|
* 배치 작업 삭제
|
|
*/
|
|
router.delete('/:id', BatchController.deleteBatchJob);
|
|
|
|
/**
|
|
* POST /api/batch/:id/execute
|
|
* 배치 작업 수동 실행
|
|
*/
|
|
router.post('/:id/execute', BatchController.executeBatchJob);
|
|
|
|
/**
|
|
* GET /api/batch/executions
|
|
* 배치 실행 목록 조회
|
|
*/
|
|
router.get('/executions/list', BatchController.getBatchExecutions);
|
|
|
|
/**
|
|
* GET /api/batch/monitoring
|
|
* 배치 모니터링 정보 조회
|
|
*/
|
|
router.get('/monitoring/status', BatchController.getBatchMonitoring);
|
|
|
|
/**
|
|
* GET /api/batch/types/supported
|
|
* 지원되는 작업 타입 조회
|
|
*/
|
|
router.get('/types/supported', BatchController.getSupportedJobTypes);
|
|
|
|
/**
|
|
* GET /api/batch/schedules/presets
|
|
* 스케줄 프리셋 조회
|
|
*/
|
|
router.get('/schedules/presets', BatchController.getSchedulePresets);
|
|
|
|
export default router;
|