This commit is contained in:
2025-12-03 16:41:01 +08:00
parent 3d50fde0eb
commit d49ecc83fa
27 changed files with 7542 additions and 43 deletions

View File

@@ -1,6 +1,10 @@
// base
import { app } from '../app.ts';
import './noco/index.ts';
import './noco/config.ts';
// 添加认证中间件路由
const hasAuth = app.router.routes.some(r => r.id === 'auth');
if (!hasAuth) {
console.log('添加认证中间件路由');
@@ -11,5 +15,7 @@ if (!hasAuth) {
id: 'auth'
}).define(async (ctx) => {
// 这里可以添加实际的认证逻辑
ctx.query.token = process.env.TOKEN || ' ';
console.log('本地测试认证通过,设置 token');
}).addTo(app);
}