Context for routes methods

This commit is contained in:
porosnicuadrian
2021-05-26 17:14:28 +03:00
committed by Dan Christian Bogos
parent 8584e77b78
commit 7950cc8a7d
5 changed files with 5 additions and 5 deletions

View File

@@ -1268,7 +1268,7 @@ func (dm *DataManager) SetRouteProfile(ctx *context.Context, rpp *RouteProfile,
return
}
func (dm *DataManager) RemoveRouteProfile(tenant, id string, withIndex bool) (err error) {
func (dm *DataManager) RemoveRouteProfile(ctx *context.Context, tenant, id string, withIndex bool) (err error) {
if dm == nil {
return utils.ErrNoDatabaseConn
}

View File

@@ -757,7 +757,7 @@ func (tpr *TpReader) RemoveFromDatabase(verbose, disableReverse bool) (err error
log.Print("RouteProfiles:")
}
for _, tpSpl := range tpr.routeProfiles {
if err = tpr.dm.RemoveRouteProfile(tpSpl.Tenant, tpSpl.ID, true); err != nil {
if err = tpr.dm.RemoveRouteProfile(context.TODO(), tpSpl.Tenant, tpSpl.ID, true); err != nil {
return
}
if verbose {