feat: add support for custom error messages in auth middleware
This commit is contained in:
@@ -54,7 +54,7 @@ func (f *Middlewares) Auth(ctx fiber.Ctx) error {
|
||||
return ctx.Redirect().To(fullUrl)
|
||||
}
|
||||
|
||||
user, err = models.Users.GetByID(ctx.Context(), jwt.UserID)
|
||||
user, err := models.Users.GetByID(ctx.Context(), jwt.UserID)
|
||||
if err != nil {
|
||||
// remove cookie
|
||||
ctx.ClearCookie("token")
|
||||
|
||||
Reference in New Issue
Block a user