From 0f115960d7431d097b734b8e4cea944b37bb2b8f Mon Sep 17 00:00:00 2001 From: Ke Chen Date: Tue, 31 Oct 2023 23:25:22 +0800 Subject: [PATCH] fix: update user config sql --- apis/user/apis.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apis/user/apis.go b/apis/user/apis.go index a49828e..4aa63d4 100644 --- a/apis/user/apis.go +++ b/apis/user/apis.go @@ -90,7 +90,7 @@ func ModifyUser(c *fiber.Ctx) error { } var newUser User - err = DB.Where("user_id = ?", userID).Select("config").First(&newUser).Error + err = DB.Select("config").First(&newUser, userID).Error if err != nil { return err }