Skip to content

Commit

Permalink
fix: modify division pinned error
Browse files Browse the repository at this point in the history
  • Loading branch information
JingYiJun committed Aug 5, 2024
1 parent 095fb26 commit 341659e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apis/division/apis.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package division

import (
"github.com/goccy/go-json"
"gorm.io/gorm"
"gorm.io/gorm/clause"
"strconv"
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 341659e

Please sign in to comment.