From 40f5578f85e985bf1212a2357c53f4b7334918d1 Mon Sep 17 00:00:00 2001 From: xiongxiao Date: Tue, 30 Dec 2025 03:00:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=B7=AF=E7=94=B1=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=EF=BC=8C=E6=B7=BB=E5=8A=A0=E5=AF=B9=20'auth'=20?= =?UTF-8?q?=E7=9A=84=E6=8F=8F=E8=BF=B0=EF=BC=8C=E4=BC=98=E5=8C=96=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E8=8E=B7=E5=8F=96=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.ts | 5 ++++- src/index.ts | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) 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