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{