zhulijian1 commented on a change in pull request #127: able to get key by id
URL: https://github.com/apache/servicecomb-kie/pull/127#discussion_r398341256
 
 

 ##########
 File path: server/resource/v1/kv_resource.go
 ##########
 @@ -122,11 +122,25 @@ func (r *KVResource) List(rctx *restful.Context) {
        var err error
        project := rctx.ReadPathParameter(PathParameterProject)
        domain := ReadDomain(rctx)
+       kvID := rctx.ReadQueryParameter(common.QueryParamKeyID)
+       if kvID != "" {
+               kv, err := service.KVService.Get(rctx.Ctx, domain.(string), 
project, kvID)
+               if err != nil {
+                       WriteErrResponse(rctx, http.StatusBadRequest, 
err.Error(), common.ContentTypeText)
 
 Review comment:
   不一定是BadRequest,可能是数据库内部错误、和没找到

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to