Skip to content

Commit

Permalink
fix:修复配置标签转换不对 & 客户端接口错误信息描述不对 (#1274)
Browse files Browse the repository at this point in the history
  • Loading branch information
chuntaojun authored Oct 24, 2023
1 parent 289a5bd commit 7f229a1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common/model/config_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ func FromTagMap(kvs map[string]string) []*config_manage.ConfigFileTag {
func ToTagMap(tags []*config_manage.ConfigFileTag) map[string]string {
kvs := map[string]string{}
for i := range tags {
kvs[tags[i].GetKey().GetValue()] = tags[i].GetKey().GetValue()
kvs[tags[i].GetKey().GetValue()] = tags[i].GetValue().GetValue()
}

return kvs
Expand Down
4 changes: 4 additions & 0 deletions service/client_v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -494,22 +494,26 @@ func (s *Server) getServiceCache(name string, namespace string) *model.Service {
func (s *Server) commonCheckDiscoverRequest(req *apiservice.Service, resp *apiservice.DiscoverResponse) bool {
if s.caches == nil {
resp.Code = utils.NewUInt32Value(uint32(apimodel.Code_ClientAPINotOpen))
resp.Info = utils.NewStringValue(api.Code2Info(resp.GetCode().GetValue()))
resp.Service = req
return false
}
if req == nil {
resp.Code = utils.NewUInt32Value(uint32(apimodel.Code_EmptyRequest))
resp.Info = utils.NewStringValue(api.Code2Info(resp.GetCode().GetValue()))
resp.Service = req
return false
}

if req.GetName().GetValue() == "" {
resp.Code = utils.NewUInt32Value(uint32(apimodel.Code_InvalidServiceName))
resp.Info = utils.NewStringValue(api.Code2Info(resp.GetCode().GetValue()))
resp.Service = req
return false
}
if req.GetNamespace().GetValue() == "" {
resp.Code = utils.NewUInt32Value(uint32(apimodel.Code_InvalidNamespaceName))
resp.Info = utils.NewStringValue(api.Code2Info(resp.GetCode().GetValue()))
resp.Service = req
return false
}
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.17.3
v1.17.6

0 comments on commit 7f229a1

Please sign in to comment.