fixed incorrect type when changing character costume
This commit is contained in:
2
main.go
2
main.go
@@ -3,6 +3,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"bdgrp_go/master"
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
@@ -81,5 +82,6 @@ func main() {
|
||||
}
|
||||
}()
|
||||
|
||||
go master.ReloadMaster()
|
||||
app.Listen(PORT)
|
||||
}
|
||||
|
||||
@@ -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{}
|
||||
|
||||
Reference in New Issue
Block a user