checking blocked user on login

pull/1/head
Nilo Roberto C Paim 2023-09-05 15:44:39 -03:00
parent 45e7d9f99a
commit d72b4f4d63
1 changed files with 9 additions and 0 deletions

View File

@ -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