Initial commit

This commit is contained in:
kevisual
2025-12-01 12:05:58 +08:00
commit da3958f8f0
13 changed files with 1259 additions and 0 deletions

15
src/routes/index.ts Normal file
View File

@@ -0,0 +1,15 @@
// 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);
}