Added extra configurable fields for DispatcherHost related structs, corresponding tests and redesigned methods where needed

This commit is contained in:
nickolasdaniel
2021-07-14 16:32:53 +03:00
committed by Dan Christian Bogos
parent bf78386bf2
commit 016e913190
11 changed files with 305 additions and 84 deletions

View File

@@ -1544,7 +1544,10 @@ func (sqls *SQLStorage) GetTPDispatcherHosts(tpid, tenant, id string) ([]*utils.
if err := q.Find(&dpps).Error; err != nil {
return nil, err
}
arls := dpps.AsTPDispatcherHosts()
arls, err := dpps.AsTPDispatcherHosts()
if err != nil {
return nil, err
}
if len(arls) == 0 {
return arls, utils.ErrNotFound
}