Commit 01523a989aa0acab24894c742dcd89877a8e537f
1 parent
33c8db5c
Exists in
master
提交
Showing
2 changed files
with
4 additions
and
3 deletions
Show diff stats
src/HttpServer/logic/datadef.go
1 | package logic | 1 | package logic |
2 | 2 | ||
3 | type TestAddCatReq struct { | 3 | type TestAddCatReq struct { |
4 | - Position int `json:"position"` | ||
5 | - CatId int `json:"catId"` | 4 | + Position int `json:"position"` |
5 | + CatId string `json:"catId"` | ||
6 | } | 6 | } |
7 | 7 | ||
8 | type TestAddCatData struct { | 8 | type TestAddCatData struct { |
src/HttpServer/logic/logic.go
@@ -75,7 +75,8 @@ func HandlerTestaddCat(w http.ResponseWriter, data string, uuid int) { | @@ -75,7 +75,8 @@ func HandlerTestaddCat(w http.ResponseWriter, data string, uuid int) { | ||
75 | break | 75 | break |
76 | } | 76 | } |
77 | 77 | ||
78 | - uinfo.PosInfo[rdata.Position].Cat = rdata.CatId | 78 | + catid, _ := strconv.Atoi(rdata.CatId) |
79 | + uinfo.PosInfo[rdata.Position].Cat = catid | ||
79 | break | 80 | break |
80 | } | 81 | } |
81 | 82 |