humingcheng commented on a change in pull request #124: Support parameter 
validation
URL: https://github.com/apache/servicecomb-kie/pull/124#discussion_r399029370
 
 

 ##########
 File path: server/resource/v1/kv_resource.go
 ##########
 @@ -49,9 +51,9 @@ func (r *KVResource) Put(context *restful.Context) {
        kv.Key = key
        kv.Domain = domain.(string)
        kv.Project = project
-       _, err = checkStatus(kv.Status)
+       err = validate.Validate(kv)
        if err != nil {
-               WriteErrResponse(context, http.StatusInternalServerError, 
err.Error(), common.ContentTypeText)
+               WriteErrResponse(context, http.StatusBadRequest, err.Error(), 
common.ContentTypeText)
 
 Review comment:
   已修改为json

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to