Skip to content

Commit 745bc8a

Browse files
bugfix
1 parent b5e59ff commit 745bc8a

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

handlers/auth.go

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,7 @@ func (ah AuthHandler) Authenticate(c *fiber.Ctx) error {
2626
"message": err.Error(),
2727
})
2828
}
29-
if body.ConnectionToken != "" && body.Password != "" {
30-
log.Errorf("Authenticate: You have to connect with only one of the following methods: connection token / password")
31-
return c.Status(fiber.StatusInternalServerError).JSON(fiber.Map{
32-
"message": "You have to connect with only one of the following methods: connection token / password",
33-
})
34-
}
35-
if body.ConnectionToken == "" && body.Password == "" {
36-
log.Errorf("Authenticate: You have to connect with one of the following methods: connection token / password")
37-
return c.Status(fiber.StatusInternalServerError).JSON(fiber.Map{
38-
"message": "You have to connect with one of the following methods: connection token / password",
39-
})
40-
}
29+
4130
if err := utils.Validate(body); err != nil {
4231
return c.Status(400).JSON(fiber.Map{
4332
"message": err,

0 commit comments

Comments
 (0)