cleaned up middlewares.go
This commit is contained in:
@@ -50,19 +50,3 @@ func JWTProtected(s *Server) func(c *fiber.Ctx) error {
|
||||
})(c)
|
||||
}
|
||||
}
|
||||
|
||||
// func jwtError(c *fiber.Ctx, err error) error {
|
||||
// // Return status 400 Bad Request and failed authentication error.
|
||||
// if err.Error() == "Missing or malformed JWT" {
|
||||
// return c.Status(fiber.StatusBadRequest).JSON(fiber.Map{
|
||||
// "error": true,
|
||||
// "msg": err.Error(),
|
||||
// })
|
||||
// }
|
||||
|
||||
// // Return status 401 Unauthorized and failed authentication error.
|
||||
// return c.Status(fiber.StatusUnauthorized).JSON(fiber.Map{
|
||||
// "error": true,
|
||||
// "msg": err.Error(),
|
||||
// })
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user