后台登录已经成功
This commit is contained in:
@@ -296,9 +296,10 @@ const adminLogin = async (req, res, next) => {
|
||||
// 更新最后登录时间
|
||||
await UserMySQL.updateLastLogin(user.id);
|
||||
|
||||
// 调整返回数据结构以匹配前端期望的格式
|
||||
res.json(success({
|
||||
user: UserMySQL.sanitize(user),
|
||||
token,
|
||||
admin: UserMySQL.sanitize(user),
|
||||
message: '管理员登录成功'
|
||||
}));
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user