From 22da3a0dedf900fdb536425064e07c25fe08fd8d Mon Sep 17 00:00:00 2001 From: Nilo Roberto C Paim Date: Tue, 5 Sep 2023 17:47:14 -0300 Subject: [PATCH] fix on search used channels --- controllers/authController.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/controllers/authController.go b/controllers/authController.go index ff0ec38..62d0453 100644 --- a/controllers/authController.go +++ b/controllers/authController.go @@ -18,8 +18,6 @@ import ( // Login - Login. Returns a JWT token on the response body func Login(c *fiber.Ctx) error { - log.Printf("Login endpoint started\n") - var data map[string]string if err := c.BodyParser(&data); err != nil { @@ -108,7 +106,7 @@ func AddUser(c *fiber.Ctx) error { database.DB.Where("channel = ?", strings.ToLower(data["channel"])).First(&user) - if user.Id == 0 { + if user.Id != 0 { return c.JSON(fiber.Map{ "message": "Canal já em uso"}) }