83 lines
2.7 KiB
TypeScript
83 lines
2.7 KiB
TypeScript
// 배치관리 전용 라우트 (기존 소스와 완전 분리)
|
|
// 작성일: 2024-12-24
|
|
|
|
import { Router } from "express";
|
|
import { BatchManagementController } from "../controllers/batchManagementController";
|
|
import { authenticateToken } from "../middleware/authMiddleware";
|
|
|
|
const router = Router();
|
|
|
|
/**
|
|
* GET /api/batch-management/connections
|
|
* 사용 가능한 커넥션 목록 조회
|
|
*/
|
|
router.get("/connections", authenticateToken, BatchManagementController.getAvailableConnections);
|
|
|
|
/**
|
|
* GET /api/batch-management/connections/:type/tables
|
|
* 내부 DB 테이블 목록 조회
|
|
*/
|
|
router.get("/connections/:type/tables", authenticateToken, BatchManagementController.getTablesFromConnection);
|
|
|
|
/**
|
|
* GET /api/batch-management/connections/:type/:id/tables
|
|
* 외부 DB 테이블 목록 조회
|
|
*/
|
|
router.get("/connections/:type/:id/tables", authenticateToken, BatchManagementController.getTablesFromConnection);
|
|
|
|
/**
|
|
* GET /api/batch-management/connections/:type/tables/:tableName/columns
|
|
* 내부 DB 테이블 컬럼 정보 조회
|
|
*/
|
|
router.get("/connections/:type/tables/:tableName/columns", authenticateToken, BatchManagementController.getTableColumns);
|
|
|
|
/**
|
|
* GET /api/batch-management/connections/:type/:id/tables/:tableName/columns
|
|
* 외부 DB 테이블 컬럼 정보 조회
|
|
*/
|
|
router.get("/connections/:type/:id/tables/:tableName/columns", authenticateToken, BatchManagementController.getTableColumns);
|
|
|
|
/**
|
|
* POST /api/batch-management/batch-configs
|
|
* 배치 설정 생성
|
|
*/
|
|
router.post("/batch-configs", authenticateToken, BatchManagementController.createBatchConfig);
|
|
|
|
/**
|
|
* GET /api/batch-management/batch-configs
|
|
* 배치 설정 목록 조회
|
|
*/
|
|
router.get("/batch-configs", authenticateToken, BatchManagementController.getBatchConfigs);
|
|
|
|
/**
|
|
* GET /api/batch-management/batch-configs/:id
|
|
* 특정 배치 설정 조회
|
|
*/
|
|
router.get("/batch-configs/:id", authenticateToken, BatchManagementController.getBatchConfigById);
|
|
|
|
/**
|
|
* PUT /api/batch-management/batch-configs/:id
|
|
* 배치 설정 업데이트
|
|
*/
|
|
router.put("/batch-configs/:id", authenticateToken, BatchManagementController.updateBatchConfig);
|
|
|
|
/**
|
|
* POST /api/batch-management/batch-configs/:id/execute
|
|
* 배치 수동 실행
|
|
*/
|
|
router.post("/batch-configs/:id/execute", authenticateToken, BatchManagementController.executeBatchConfig);
|
|
|
|
/**
|
|
* POST /api/batch-management/rest-api/preview
|
|
* REST API 데이터 미리보기
|
|
*/
|
|
router.post("/rest-api/preview", authenticateToken, BatchManagementController.previewRestApiData);
|
|
|
|
/**
|
|
* POST /api/batch-management/rest-api/save
|
|
* REST API 배치 저장
|
|
*/
|
|
router.post("/rest-api/save", authenticateToken, BatchManagementController.saveRestApiBatch);
|
|
|
|
export default router;
|