[REV] optimize get tenant by name

This commit is contained in:
bay1ts 2017-12-07 13:47:25 +08:00
parent bd4f1bc7e1
commit 5617e1baf9

View File

@ -225,7 +225,7 @@ func (t *TenantStruct) TenantsGetByName(w http.ResponseWriter, r *http.Request)
return
}
logrus.Infof("query tenant from db by name %s ,got %v",tenantName,v)
var res *api_model.TenantResource
var res =&api_model.TenantResource{}
services, err := handler.GetServiceManager().GetService(v.UUID)
if err != nil {
httputil.ReturnError(r, w, 500, fmt.Sprintf("get services by tenantID %s error, %v",v.UUID, err))