Refactor auth routes and update dependencies
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user