From 663a162005b4a1a53812beec5bf86d881fd6bb81 Mon Sep 17 00:00:00 2001 From: Nilo Roberto C Paim Date: Tue, 5 Sep 2023 17:41:54 -0300 Subject: [PATCH] fix search for channel --- controllers/authController.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/authController.go b/controllers/authController.go index 0cfc7fd..ff0ec38 100644 --- a/controllers/authController.go +++ b/controllers/authController.go @@ -106,7 +106,7 @@ func AddUser(c *fiber.Ctx) error { var user models.User - database.DB.Find(&user, "channel = ?", strings.ToLower(data["channel"])) + database.DB.Where("channel = ?", strings.ToLower(data["channel"])).First(&user) if user.Id == 0 { return c.JSON(fiber.Map{