后台登录已经成功

This commit is contained in:
2025-08-31 19:31:24 +08:00
parent 8e5295b572
commit 0e0585aacc
5 changed files with 9 additions and 4 deletions

View File

@@ -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) {