@@ -475,6 +475,12 @@ func GetProductListHandler(ctx *gin.Context) {
|
||||
ctx.String(http.StatusOK, resp)
|
||||
}
|
||||
|
||||
func GuestStatusHandler(ctx *gin.Context) {
|
||||
resp := `{"code":0,"msg":"ok","data":{"disablead":1,"loginswitch":1,"message":"ok","result":0}}`
|
||||
ctx.Header("Content-Type", "text/html;charset=utf-8")
|
||||
ctx.String(http.StatusOK, resp)
|
||||
}
|
||||
|
||||
func ReportLog(ctx *gin.Context) {
|
||||
// body, err := io.ReadAll(ctx.Request.Body)
|
||||
// CheckErr(err)
|
||||
|
||||
@@ -31,6 +31,7 @@ func main() {
|
||||
v1 := r.Group("v1")
|
||||
{
|
||||
v1.GET("/basic/getcode", handler.GetCodeHandler)
|
||||
v1.POST("/basic/getcode", handler.GetCodeHandler)
|
||||
v1.POST("/account/active", handler.ActiveHandler)
|
||||
v1.POST("/basic/publickey", handler.PublicKeyHandler)
|
||||
v1.POST("/basic/handshake", handler.HandshakeHandler)
|
||||
@@ -40,6 +41,7 @@ func main() {
|
||||
v1.POST("/basic/loginarea", handler.LoginAreaHandler)
|
||||
v1.POST("/account/reportRole", handler.ReportRoleHandler)
|
||||
v1.POST("/basic/getProductList", handler.GetProductListHandler)
|
||||
v1.POST("/guest/status", handler.GuestStatusHandler)
|
||||
}
|
||||
r.GET("/agreement/all", handler.AgreementHandler)
|
||||
r.GET("/integration/appReport/initialize", handler.ReportApp)
|
||||
|
||||
@@ -9,7 +9,6 @@ import (
|
||||
)
|
||||
|
||||
func ParseMultipartForm(ctx *gin.Context) {
|
||||
if ctx.Request.Header.Get("OS") != "Android" {
|
||||
// I don't know why mime.ParseMediaType() is failed
|
||||
// mime.ParseMediaType(ctx.Request.Header.Get("Content-Type"))
|
||||
boundary := strings.ReplaceAll(ctx.Request.Header.Get("Content-Type"), "multipart/form-data; boundary=", "")
|
||||
@@ -29,9 +28,6 @@ func ParseMultipartForm(ctx *gin.Context) {
|
||||
reqData = data
|
||||
}
|
||||
ctx.Set("request_data", string(reqData))
|
||||
} else {
|
||||
ctx.Set("request_data", ctx.PostForm("request_data"))
|
||||
}
|
||||
|
||||
ctx.Next()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user