fixed incorrect type when changing character costume
This commit is contained in:
2
main.go
2
main.go
@@ -3,6 +3,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bdgrp_go/master"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
@@ -81,5 +82,6 @@ func main() {
|
|||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
go master.ReloadMaster()
|
||||||
app.Listen(PORT)
|
app.Listen(PORT)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import (
|
|||||||
"bdgrp_go/routes"
|
"bdgrp_go/routes"
|
||||||
"bdgrp_go/utils"
|
"bdgrp_go/utils"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
)
|
)
|
||||||
@@ -27,7 +28,8 @@ func changeCostume(c *fiber.Ctx) error {
|
|||||||
|
|
||||||
wearingCostume := user["wearingCostume"].(map[string]any)
|
wearingCostume := user["wearingCostume"].(map[string]any)
|
||||||
costume := wearingCostume[characterid].(map[string]any)
|
costume := wearingCostume[characterid].(map[string]any)
|
||||||
costume["costumeId"] = costumeid
|
cid, _ := strconv.Atoi(costumeid)
|
||||||
|
costume["costumeId"] = cid
|
||||||
db.Save()
|
db.Save()
|
||||||
|
|
||||||
charMap := map[string]any{}
|
charMap := map[string]any{}
|
||||||
|
|||||||
Reference in New Issue
Block a user