更新路由定义,添加对 'auth' 的描述,优化列表获取逻辑

This commit is contained in:
2025-12-30 03:00:35 +08:00
parent f15f6f14e4
commit 40f5578f85
2 changed files with 6 additions and 2 deletions

View File

@@ -20,7 +20,10 @@ app.route({
key: 'list' key: 'list'
}).define(async (ctx) => { }).define(async (ctx) => {
ctx.body = { ctx.body = {
list: app.router.getList() list: app.router.getList((item) => {
if (item.id === 'auth') return false
return true
})
} }
}).addTo(app); }).addTo(app);

View File

@@ -5,7 +5,8 @@ import './routes/index.ts';
// 如果是直接运行,则启动应用 // 如果是直接运行,则启动应用
app.route({ app.route({
id: 'auth' id: 'auth',
description: 'Token 权限验证,临时方案',
}).define(async (ctx) => { }).define(async (ctx) => {
// token authentication // token authentication