feat: 重构CNB管理模块,添加清理记录功能,更新中间件为统一认证方式,优化工作空间相关路由
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { app } from '../../app.ts';
|
||||
import { app, notCNBCheck } from '../../app.ts';
|
||||
import './cnb-dev-env.ts';
|
||||
import { useKey } from '@kevisual/context';
|
||||
import { spawnSync } from 'node:child_process';
|
||||
@@ -31,8 +31,9 @@ app.route({
|
||||
path: 'cnb_board',
|
||||
key: 'exit',
|
||||
description: 'cnb的工作环境退出程序',
|
||||
middleware: ['auth-admin'],
|
||||
middleware: ['auth'],
|
||||
}).define(async (ctx) => {
|
||||
if (notCNBCheck(ctx)) return;
|
||||
const cmd = 'kill 1';
|
||||
execCommand(cmd);
|
||||
}).addTo(app);
|
||||
Reference in New Issue
Block a user