mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-11-30 02:38:17 +08:00
[REV] optimize get tenant by name
This commit is contained in:
parent
8f3eb99c92
commit
bd4f1bc7e1
@ -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 {
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user