feat: add static file serving and refactor route registration

This commit is contained in:
2025-12-16 22:40:31 +08:00
parent 55c40c4601
commit 2a12e1c3a9
7 changed files with 41 additions and 21 deletions

View File

@@ -38,7 +38,7 @@ func (ctl *authController) login(ctx fiber.Ctx, form *dto.LoginForm) (*dto.Login
}
if !m.Roles.Contains(consts.RoleSuperAdmin) {
return nil, errorx.Wrap(err).WithMsg("用户名或密码错误")
return nil, errorx.Wrap(errorx.ErrInvalidCredentials).WithMsg("用户名或密码错误")
}
token, err := ctl.jwt.CreateToken(ctl.jwt.CreateClaims(jwt.BaseClaims{