diff --git a/controllers/authController.go b/controllers/authController.go index ef1b886..c41d264 100644 --- a/controllers/authController.go +++ b/controllers/authController.go @@ -48,6 +48,15 @@ func Login(c *fiber.Ctx) error { "token": ""}) } + if user.Blocked == "S" { + return c.JSON(fiber.Map{ + "message": "Usuário bloqueado", + "userId": 0, + "userType": "", + "userName": "", + "token": ""}) + } + type customClaims struct { Userid string `json:"user"` jwt.StandardClaims