This commit is contained in:
Baobhan Sith
2025-04-26 15:20:37 +08:00
parent 93b8863fdd
commit e269f40754
80 changed files with 868 additions and 1528 deletions
@@ -1,13 +1,11 @@
import { Router } from 'express';
import * as CommandHistoryController from './command-history.controller';
import { isAuthenticated } from '../auth/auth.middleware'; // 使用正确的认证中间件
import { isAuthenticated } from '../auth/auth.middleware';
const router = Router();
// 应用认证中间件到所有命令历史记录相关的路由
router.use(isAuthenticated);
// 定义路由
router.post('/', CommandHistoryController.addCommand); // POST /api/command-history
router.get('/', CommandHistoryController.getAllCommands); // GET /api/command-history
router.delete('/:id', CommandHistoryController.deleteCommand); // DELETE /api/command-history/:id