This commit is contained in:
geek 2018-04-12 15:24:46 +09:00
parent 5978f6817e
commit 87b2609eb0

View File

@ -103,7 +103,7 @@ func (s *RESTServlets) HandlePost(servletCtx server.ServletCtx, ctx *fasthttp.Re
return csw.NewError(fasthttp.StatusBadRequest, fmt.Errorf("Parameter is not valied"))
}
var jsonMap map[string]string
var jsonMap map[string]json.RawMessage
if err := json.Unmarshal(buf, &jsonMap); nil != err {
return csw.NewError(fasthttp.StatusBadRequest, fmt.Errorf("Parameter is not valied %v", err))
}
@ -113,7 +113,7 @@ func (s *RESTServlets) HandlePost(servletCtx server.ServletCtx, ctx *fasthttp.Re
if !ok {
return csw.NewError(fasthttp.StatusBadRequest, fmt.Errorf("Parameter for %s is not valied", k))
}
params = append(params, v)
params = append(params, string(v))
}
}