diff --git a/engine/libsuppliers.go b/engine/libsuppliers.go index 5a82df6b8..4d0d10046 100644 --- a/engine/libsuppliers.go +++ b/engine/libsuppliers.go @@ -108,12 +108,12 @@ func NewSupplierSortDispatcher(lcrS *SupplierService) (ssd SupplierSortDispatche type SupplierSortDispatcher map[string]SuppliersSorter func (ssd SupplierSortDispatcher) SortSuppliers(prflID, strategy string, - suppls []*Supplier, suplEv *utils.CGREvent, extraFields *extraOptions) (sortedSuppls *SortedSuppliers, err error) { + suppls []*Supplier, suplEv *utils.CGREvent, extraFilters *extraOptions) (sortedSuppls *SortedSuppliers, err error) { sd, has := ssd[strategy] if !has { return nil, fmt.Errorf("unsupported sorting strategy: %s", strategy) } - return sd.SortSuppliers(prflID, suppls, suplEv, extraFields) + return sd.SortSuppliers(prflID, suppls, suplEv, extraFilters) } func NewWeightSorter() *WeightSorter { @@ -126,7 +126,7 @@ type WeightSorter struct { } func (ws *WeightSorter) SortSuppliers(prflID string, - suppls []*Supplier, suplEv *utils.CGREvent, extraFields *extraOptions) (sortedSuppls *SortedSuppliers, err error) { + suppls []*Supplier, suplEv *utils.CGREvent, extraFilters *extraOptions) (sortedSuppls *SortedSuppliers, err error) { sortedSuppls = &SortedSuppliers{ProfileID: prflID, Sorting: ws.sorting, SortedSuppliers: make([]*SortedSupplier, len(suppls))} diff --git a/engine/libsuppliers_test.go b/engine/libsuppliers_test.go index 03caa9bf2..200a2cfef 100644 --- a/engine/libsuppliers_test.go +++ b/engine/libsuppliers_test.go @@ -137,7 +137,7 @@ func TestLibSuppliersSortWeight(t *testing.T) { Event: make(map[string]interface{}), } ws := NewWeightSorter() - result, err := ws.SortSuppliers("SPL_WEIGHT_1", spl, se) + result, err := ws.SortSuppliers("SPL_WEIGHT_1", spl, se, nil) if err != nil { t.Error(err) } diff --git a/engine/spls_leastcost.go b/engine/spls_leastcost.go index 31918bf58..14a5a3bcd 100644 --- a/engine/spls_leastcost.go +++ b/engine/spls_leastcost.go @@ -41,8 +41,8 @@ type extraOptions struct { ignoreErrors bool } -func (lcs *LeastCostSorter) SortSuppliers(prflID string, - suppls []*Supplier, ev *utils.CGREvent, extraFilters *extraOptions) (sortedSuppls *SortedSuppliers, err error) { +func (lcs *LeastCostSorter) SortSuppliers(prflID string, suppls []*Supplier, + ev *utils.CGREvent, extraFilters *extraOptions) (sortedSuppls *SortedSuppliers, err error) { sortedSuppls = &SortedSuppliers{ProfileID: prflID, Sorting: lcs.sorting, SortedSuppliers: make([]*SortedSupplier, 0)}