[REV] optimize get tenant by name

This commit is contained in:
bay1ts 2017-12-07 13:42:45 +08:00
parent 8f3eb99c92
commit bd4f1bc7e1
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -128,7 +128,7 @@ func (t *TenantAction) GetTenantsByName(name string) (*dbmodel.Tenants, error) {
if err != nil {
return nil, err
}
logrus.Infof("query tenant from db by name %s ,got %v",name,tenant)
return tenant, err
}