diff --git a/src/app.ts b/src/app.ts index be91f67..e6cb14e 100644 --- a/src/app.ts +++ b/src/app.ts @@ -20,7 +20,10 @@ app.route({ key: 'list' }).define(async (ctx) => { ctx.body = { - list: app.router.getList() + list: app.router.getList((item) => { + if (item.id === 'auth') return false + return true + }) } }).addTo(app); diff --git a/src/index.ts b/src/index.ts index 72b8328..660495b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,7 +5,8 @@ import './routes/index.ts'; // 如果是直接运行,则启动应用 app.route({ - id: 'auth' + id: 'auth', + description: 'Token 权限验证,临时方案', }).define(async (ctx) => { // token authentication