mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Remove unnecesary things
This commit is contained in:
committed by
Dan Christian Bogos
parent
909358a124
commit
da8cd6360e
@@ -402,25 +402,17 @@ func (spS *SupplierService) sortedSuppliersForEvent(args *ArgsGetSuppliers) (sor
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
srtTmp := &SortedSuppliers{
|
||||
ProfileID: sortedSuppliers.ProfileID,
|
||||
Sorting: sortedSuppliers.Sorting,
|
||||
}
|
||||
for _, s := range sortedSuppliers.SortedSuppliers {
|
||||
|
||||
srtTmp.SortedSuppliers = append(srtTmp.SortedSuppliers, s)
|
||||
}
|
||||
if args.Paginator.Offset != nil {
|
||||
if *args.Paginator.Offset <= len(srtTmp.SortedSuppliers) {
|
||||
srtTmp.SortedSuppliers = srtTmp.SortedSuppliers[*args.Paginator.Offset:]
|
||||
if *args.Paginator.Offset <= len(sortedSuppliers.SortedSuppliers) {
|
||||
sortedSuppliers.SortedSuppliers = sortedSuppliers.SortedSuppliers[*args.Paginator.Offset:]
|
||||
}
|
||||
}
|
||||
if args.Paginator.Limit != nil {
|
||||
if *args.Paginator.Limit <= len(srtTmp.SortedSuppliers) {
|
||||
srtTmp.SortedSuppliers = srtTmp.SortedSuppliers[:*args.Paginator.Limit]
|
||||
if *args.Paginator.Limit <= len(sortedSuppliers.SortedSuppliers) {
|
||||
sortedSuppliers.SortedSuppliers = sortedSuppliers.SortedSuppliers[:*args.Paginator.Limit]
|
||||
}
|
||||
}
|
||||
return srtTmp, nil
|
||||
return sortedSuppliers, nil
|
||||
}
|
||||
|
||||
type ArgsGetSuppliers struct {
|
||||
|
||||
@@ -1386,7 +1386,6 @@ type TPFilter struct {
|
||||
|
||||
type TPSupplier struct {
|
||||
ID string // SupplierID
|
||||
SortingFilter []string
|
||||
FilterIDs []string
|
||||
AccountIDs []string
|
||||
RatingPlanIDs []string // used when computing price
|
||||
|
||||
@@ -486,7 +486,6 @@ const (
|
||||
MetaLeastCost = "*least_cost"
|
||||
MetaHighestCost = "*highest_cost"
|
||||
MetaQOS = "*qos"
|
||||
MetaStatFiltered = "*stat_filtered"
|
||||
Weight = "Weight"
|
||||
Cost = "Cost"
|
||||
RatingPlanID = "RatingPlanID"
|
||||
|
||||
Reference in New Issue
Block a user