chore: 更新版本号至 0.2.2,修改路由相关属性为 rid,重构认证中间件,添加 README 文档

This commit is contained in:
xiongxiao
2026-03-23 18:35:57 +08:00
committed by cnb
parent 1a47cc65dc
commit ef905af1b8
6 changed files with 51 additions and 51 deletions

View File

@@ -60,11 +60,11 @@ export const createRouterAgentPluginFn = (opts?: {
addCallFn(router as App)
}
if (router) {
(router as any).route({ path: 'auth', key: '', id: 'auth', description: '认证' }).define(async (ctx) => { }).addTo(router as App, {
(router as any).route({ path: 'auth', key: '', rid: 'auth', description: '认证' }).define(async (ctx) => { }).addTo(router as App, {
overwrite: false
});
(router as any).route({ path: 'auth-admin', key: '', id: 'auth-admin', description: '认证' }).define(async (ctx) => { }).addTo(router as App, {
(router as any).route({ path: 'auth-admin', key: '', rid: 'auth-admin', description: '认证' }).define(async (ctx) => { }).addTo(router as App, {
overwrite: false
})
}