21 lines
625 B
TypeScript
21 lines
625 B
TypeScript
import { Router } from 'express'
|
|
import { requireAuth } from '../auth/authMiddleware.js'
|
|
import { getNumericalDataStatus } from './monitorService.js'
|
|
|
|
const router = Router()
|
|
|
|
router.use(requireAuth)
|
|
|
|
// GET /api/monitor/numerical — 수치예측자료 다운로드 상태 조회
|
|
router.get('/numerical', async (_req, res) => {
|
|
try {
|
|
const data = await getNumericalDataStatus()
|
|
res.json(data)
|
|
} catch (err) {
|
|
console.error('[monitor] 수치예측자료 상태 조회 오류:', err)
|
|
res.status(500).json({ error: '수치예측자료 상태를 조회할 수 없습니다.' })
|
|
}
|
|
})
|
|
|
|
export default router
|