This commit is contained in:
2025-12-05 10:57:02 +08:00
parent da3958f8f0
commit db3334ec6c
9 changed files with 1129 additions and 38 deletions

View File

@@ -1,15 +0,0 @@
// base
import { app } from '../app.ts';
const hasAuth = app.router.routes.some(r => r.id === 'auth');
if (!hasAuth) {
console.log('添加认证中间件路由');
app.route({
path: 'auth',
key: 'auth',
description: '用户认证',
id: 'auth'
}).define(async (ctx) => {
// 这里可以添加实际的认证逻辑
}).addTo(app);
}