Commit 12f91594656c1ed49a7ac8505ae4d111f06a130f
1 parent
337bfd09
Exists in
master
提交测试接口
Showing
1 changed file
with
15 additions
and
0 deletions
Show diff stats
src/HttpServer/logic/httpserver.go
@@ -29,6 +29,10 @@ func CheckErr(err error) { | @@ -29,6 +29,10 @@ func CheckErr(err error) { | ||
29 | } | 29 | } |
30 | 30 | ||
31 | func startServerHttpServe() { | 31 | func startServerHttpServe() { |
32 | + //------------------------------------------------------------- | ||
33 | + http.HandleFunc("/catcafe/ClearData", ClearData) //情况账号的测试接口 | ||
34 | + | ||
35 | + //------------------------------------------------------------- | ||
32 | http.HandleFunc("/catcafe/login", UserLogin) //游客登录 | 36 | http.HandleFunc("/catcafe/login", UserLogin) //游客登录 |
33 | http.HandleFunc("/catcafe/user/regeister", Regeister) //账号注册 | 37 | http.HandleFunc("/catcafe/user/regeister", Regeister) //账号注册 |
34 | http.HandleFunc("/catcafe/user/accountlogin", AccounLogin) //账号登录 | 38 | http.HandleFunc("/catcafe/user/accountlogin", AccounLogin) //账号登录 |
@@ -62,6 +66,17 @@ func startServerHttpServe() { | @@ -62,6 +66,17 @@ func startServerHttpServe() { | ||
62 | CheckErr(err) | 66 | CheckErr(err) |
63 | } | 67 | } |
64 | 68 | ||
69 | +func ClearData(w http.ResponseWriter, r *http.Request) { | ||
70 | + | ||
71 | + result, _ := ioutil.ReadAll(r.Body) | ||
72 | + r.Body.Close() | ||
73 | + | ||
74 | + s := string(result) | ||
75 | + logger.Info("ClearData , body:%v", s) | ||
76 | + | ||
77 | + //HandleRegeister(w,s) | ||
78 | +} | ||
79 | + | ||
65 | func Regeister(w http.ResponseWriter, r *http.Request) { | 80 | func Regeister(w http.ResponseWriter, r *http.Request) { |
66 | 81 | ||
67 | result, _ := ioutil.ReadAll(r.Body) | 82 | result, _ := ioutil.ReadAll(r.Body) |