This commit is contained in:
liyp 2024-04-03 22:04:03 +08:00
parent 2ddba3c31f
commit 6e7a2cc9ba
2 changed files with 2 additions and 2 deletions

View file

@ -20,7 +20,7 @@ func handlePost(w http.ResponseWriter, r *http.Request) {
http.Error(w, "Error reading request body", http.StatusBadRequest)
return
}
fmt.Println("handlePost:", string(body))
// fmt.Println("handlePost:", string(body))
// 解码 JSON 数据到 map[string]interface{} 类型的变量
var data map[string]interface{}
err = json.Unmarshal(body, &data)

View file

@ -27,7 +27,7 @@ func Router(data map[string]interface{}) {
worker := workers.NewWorker(parms, fmt.Sprintf("%d", int(uid)), fmt.Sprintf("%d", int(gid)), role, fmt.Sprintf("%d", int(mid)), raw_msg)
// fmt.Println("router:", parms[0])
fmt.Println("CheckPermission:", worker.CheckPermission())
// fmt.Println("CheckPermission:", worker.CheckPermission())
// ans := NewStdAns(parms[0], fmt.Sprintf("%d", int(uid)), fmt.Sprintf("%d", int(gid)), role, fmt.Sprintf("%d", int(mid)), raw_msg)
message := worker.CheckPermission()
if message == "0" {