完善政府端

This commit is contained in:
2025-10-09 18:01:06 +08:00
parent f88383425f
commit 1a1abf4c26
39 changed files with 4309 additions and 673 deletions

View File

@@ -0,0 +1,17 @@
const express = require('express');
const router = express.Router();
const deviceWarningController = require('../controllers/deviceWarningController');
// const authMiddleware = require('../middleware/auth'); // 假设有认证中间件
// router.use(authMiddleware); // 暂时注释掉认证中间件用于测试
// 设备预警管理路由
router.get('/', deviceWarningController.getDeviceWarnings);
router.get('/stats', deviceWarningController.getWarningStats);
router.get('/:id', deviceWarningController.getDeviceWarningById);
router.post('/', deviceWarningController.createDeviceWarning);
router.put('/:id', deviceWarningController.updateDeviceWarning);
router.delete('/:id', deviceWarningController.deleteDeviceWarning);
router.patch('/:id/status', deviceWarningController.updateWarningStatus);
module.exports = router;