From 341659e47b8ff05f98af1ad13fcb062ac13354fe Mon Sep 17 00:00:00 2001 From: Ke Chen Date: Mon, 5 Aug 2024 15:59:22 +0800 Subject: [PATCH] fix: modify division pinned error --- apis/division/apis.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apis/division/apis.go b/apis/division/apis.go index a25605d..343043a 100644 --- a/apis/division/apis.go +++ b/apis/division/apis.go @@ -1,6 +1,7 @@ package division import ( + "github.com/goccy/go-json" "gorm.io/gorm" "gorm.io/gorm/clause" "strconv" @@ -147,7 +148,8 @@ func ModifyDivision(c *fiber.Ctx) error { modifyData["description"] = *body.Description } if body.Pinned != nil { - modifyData["pinned"] = body.Pinned + data, _ := json.Marshal(body.Pinned) + modifyData["pinned"] = string(data) } if len(modifyData) == 0 {