Merge branch 'main' of http://39.117.244.52:3000/kjs/ERP-node into feature/report

This commit is contained in:
dohyeons
2025-10-13 19:16:23 +09:00
9 changed files with 2543 additions and 5 deletions

View File

@@ -49,6 +49,7 @@ import externalCallConfigRoutes from "./routes/externalCallConfigRoutes";
import dataflowExecutionRoutes from "./routes/dataflowExecutionRoutes";
import dashboardRoutes from "./routes/dashboardRoutes";
import reportRoutes from "./routes/reportRoutes";
import openApiProxyRoutes from "./routes/openApiProxyRoutes"; // 날씨/환율 API
import { BatchSchedulerService } from "./services/batchSchedulerService";
// import collectionRoutes from "./routes/collectionRoutes"; // 임시 주석
// import batchRoutes from "./routes/batchRoutes"; // 임시 주석
@@ -192,6 +193,7 @@ app.use("/api/external-call-configs", externalCallConfigRoutes);
app.use("/api/dataflow", dataflowExecutionRoutes);
app.use("/api/dashboards", dashboardRoutes);
app.use("/api/admin/reports", reportRoutes);
app.use("/api/open-api", openApiProxyRoutes); // 날씨/환율 외부 API
// app.use("/api/collections", collectionRoutes); // 임시 주석
// app.use("/api/batch", batchRoutes); // 임시 주석
// app.use('/api/users', userRoutes);

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,38 @@
/**
* OpenAPI 프록시 라우트
* - 외부 API 호출을 프록시하는 라우트
*/
import { Router } from 'express';
import { OpenApiProxyController } from '../controllers/openApiProxyController';
// import { authenticateToken } from '../middleware/authMiddleware'; // 공개 API는 인증 불필요
const router = Router();
const controller = new OpenApiProxyController();
// 날씨, 환율 등 공개 정보는 인증 없이 접근 가능
// router.use(authenticateToken);
/**
* GET /api/open-api/weather
* 날씨 정보 조회 (인증 불필요)
* Query: city (도시명, 기본값: Seoul)
*/
router.get('/weather', (req, res) => controller.getWeather(req, res));
/**
* GET /api/open-api/exchange-rate
* 환율 정보 조회
* Query: base (기준 통화, 기본값: KRW), target (대상 통화, 기본값: USD)
*/
router.get('/exchange-rate', (req, res) => controller.getExchangeRate(req, res));
/**
* POST /api/open-api/geocode
* 주소를 좌표로 변환 (Geocoding)
* Body: { address: string }
*/
router.post('/geocode', (req, res) => controller.geocode(req, res));
export default router;