🐛 Fix didn't handle invalid auth sessions

This commit is contained in:
2024-03-17 23:13:44 +08:00
parent ea460c3623
commit 437c2e5b4b
2 changed files with 3 additions and 1 deletions

View File

@ -46,6 +46,6 @@ func authFunc(c *fiber.Ctx, overrides ...string) error {
c.Locals("principal", user)
return nil
} else {
return err
return fiber.NewError(fiber.StatusUnauthorized, err.Error())
}
}