Refactor auth routes and update dependencies

This commit is contained in:
xiongxiao
2026-03-23 19:40:00 +08:00
committed by cnb
parent f995aa63a2
commit 36a54652c1
4 changed files with 232 additions and 215 deletions

View File

@@ -86,7 +86,7 @@ export const checkAuth = async (ctx: any, isAdmin = false) => {
app
.route({
path: 'auth',
id: 'auth',
rid: 'auth',
description: '获取当前登录用户信息, 第一个登录的用户为管理员用户',
})
.define(async (ctx) => {
@@ -102,7 +102,7 @@ app
app
.route({
path: 'auth-admin',
id: 'auth-admin',
rid: 'auth-admin',
description: '管理员鉴权, 获取用户信息,并验证是否为管理员。',
})
.define(async (ctx) => {