checking blocked user on login
parent
45e7d9f99a
commit
d72b4f4d63
|
|
@ -48,6 +48,15 @@ func Login(c *fiber.Ctx) error {
|
||||||
"token": ""})
|
"token": ""})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if user.Blocked == "S" {
|
||||||
|
return c.JSON(fiber.Map{
|
||||||
|
"message": "Usuário bloqueado",
|
||||||
|
"userId": 0,
|
||||||
|
"userType": "",
|
||||||
|
"userName": "",
|
||||||
|
"token": ""})
|
||||||
|
}
|
||||||
|
|
||||||
type customClaims struct {
|
type customClaims struct {
|
||||||
Userid string `json:"user"`
|
Userid string `json:"user"`
|
||||||
jwt.StandardClaims
|
jwt.StandardClaims
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue