fixed incorrect type when changing character costume

This commit is contained in:
2026-09-14 18:28:44 +08:00
parent 000b498f0e
commit c4154581a6
2 changed files with 5 additions and 1 deletions

View File

@@ -6,6 +6,7 @@ import (
"bdgrp_go/routes"
"bdgrp_go/utils"
"fmt"
"strconv"
"github.com/gofiber/fiber/v2"
)
@@ -27,7 +28,8 @@ func changeCostume(c *fiber.Ctx) error {
wearingCostume := user["wearingCostume"].(map[string]any)
costume := wearingCostume[characterid].(map[string]any)
costume["costumeId"] = costumeid
cid, _ := strconv.Atoi(costumeid)
costume["costumeId"] = cid
db.Save()
charMap := map[string]any{}