From 85bb46cac6c032c2c8fac192695faeadad7c616d Mon Sep 17 00:00:00 2001 From: Radu Ioan Fericean Date: Fri, 6 May 2016 15:19:16 +0300 Subject: [PATCH] for DanB with love --- apier/v2/apier.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/apier/v2/apier.go b/apier/v2/apier.go index 7275a6bac..6d25140b6 100644 --- a/apier/v2/apier.go +++ b/apier/v2/apier.go @@ -227,7 +227,6 @@ func (self *ApierV2) LoadTariffPlanFromFolder(attrs utils.AttrLoadTpFromFolder, userKeys, _ := loader.GetLoadedIds(utils.USERS_PREFIX) li := loader.GetLoadInstance() loader.Init() // release the tp data - if err := self.RatingDb.CacheRatingPrefixValues(map[string][]string{ utils.DESTINATION_PREFIX: dstKeys, utils.RATING_PLAN_PREFIX: rpKeys, @@ -321,25 +320,25 @@ func (self *ApierV2) GetActions(attr AttrGetActions, reply *map[string]engine.Ac } type AttrGetDestinations struct { - DestIDs []string + DestinationIDs []string } func (self *ApierV2) GetDestinations(attr AttrGetDestinations, reply *[]*engine.Destination) error { dests := make([]*engine.Destination, 0) - if attr.DestIDs == nil { + if attr.DestinationIDs == nil { return utils.NewErrMandatoryIeMissing("DestIDs") } - if len(attr.DestIDs) == 0 { + if len(attr.DestinationIDs) == 0 { // get all destination ids destIDs, err := self.RatingDb.GetKeysForPrefix(utils.DESTINATION_PREFIX, true) if err != nil { return err } for _, destID := range destIDs { - attr.DestIDs = append(attr.DestIDs, destID[len(utils.DESTINATION_PREFIX):]) + attr.DestinationIDs = append(attr.DestinationIDs, destID[len(utils.DESTINATION_PREFIX):]) } } - for _, destID := range attr.DestIDs { + for _, destID := range attr.DestinationIDs { dst, err := self.RatingDb.GetDestination(destID) if err != nil { return err