diff --git a/src/HttpServer/logic/httpserver.go b/src/HttpServer/logic/httpserver.go index fb4b2df..e16ac5e 100644 --- a/src/HttpServer/logic/httpserver.go +++ b/src/HttpServer/logic/httpserver.go @@ -116,6 +116,7 @@ func startServerHttpServe() { http.HandleFunc("/api/test/addFlop", AddFlop) //增加翻牌 http.HandleFunc("/api/test/settlement", Settlement) //发财猫开奖 http.HandleFunc("/api/test/addresource", Addresource) //增加资源 + http.HandleFunc("/api/test/cleardata", Cleardata) //清号 //real http.HandleFunc("/api/account/login", UserLogin) //登录 @@ -1336,6 +1337,26 @@ func Getrandredbag(w http.ResponseWriter, r *http.Request) { HandlerGetrandredbag(w, s, Uuid) } +func Cleardata(w http.ResponseWriter, r *http.Request) { + Uuid := 0 + if len(r.Header) > 0 { + Uuid, _ = strconv.Atoi(r.Header.Get("uid")) + } + if Uuid == 0 { + SetHeader(w) + return + } + result, _ := ioutil.ReadAll(r.Body) + r.Body.Close() + + s := string(result) + logger.Info("Cleardata , body:%v,uuid=%v", s, Uuid) + + //SaveUserInfo(uinfo, strconv.Itoa(Uuid)) + redishandler.GetRedisClient().HDel(redis.USER_INFO__KEY, strconv.Itoa(Uuid)) + fmt.Fprint(w, "success") +} + func Addresource(w http.ResponseWriter, r *http.Request) { Uuid := 0 if len(r.Header) > 0 { -- libgit2 0.21.0