Commit 39f124a0 authored by szh's avatar szh

update test

parent 5b550f00
...@@ -13,6 +13,7 @@ import ( ...@@ -13,6 +13,7 @@ import (
"log" "log"
"net/http" "net/http"
"time" "time"
"io/ioutil"
) )
func GetDevdetail(c *gin.Context) { func GetDevdetail(c *gin.Context) {
...@@ -231,4 +232,17 @@ func GetUploadTest(c *gin.Context){ ...@@ -231,4 +232,17 @@ func GetUploadTest(c *gin.Context){
logging.Info("uploadtest","report",KP) logging.Info("uploadtest","report",KP)
appG.Response(http.StatusOK, e.SUCCESS, nil) appG.Response(http.StatusOK, e.SUCCESS, nil)
}
func GetTest(c *gin.Context){
appG:=app.Gin{C:c}
body,err := ioutil.ReadAll(appG.C.Request.Body)
if err!=nil{
appG.Response(http.StatusOK, e.INVALID_PARAMS, err)
return
}
logging.Info("test","report",string(body))
appG.Response(http.StatusOK, e.SUCCESS, nil)
} }
\ No newline at end of file
...@@ -37,6 +37,7 @@ func InitRouter() *gin.Engine { ...@@ -37,6 +37,7 @@ func InitRouter() *gin.Engine {
apiv1.POST("/getfeedlist",v1.GetFeedList) apiv1.POST("/getfeedlist",v1.GetFeedList)
apiv1.POST("/uploadinfo",v1.GetUploadInfo) apiv1.POST("/uploadinfo",v1.GetUploadInfo)
apiv1.POST("/uploadtest",v1.GetUploadTest) apiv1.POST("/uploadtest",v1.GetUploadTest)
apiv1.POST("/test",v1.GetTest)
return r return r
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment