DispatcherS.AttributeSv1GetAttributeForEvent with auth implementation

This commit is contained in:
DanB
2019-02-03 12:36:07 +01:00
parent 65331fb94f
commit d758fef361

View File

@@ -32,10 +32,13 @@ func (dS *DispatcherService) AttributeSv1Ping(ign string, reply *string) error {
func (dS *DispatcherService) AttributeSv1GetAttributeForEvent(args *ArgsAttrProcessEventWithApiKey,
reply *engine.AttributeProfile) (err error) {
//if err = dS.authorize(utils.AttributeSv1GetAttributeForEvent, args.AttrArgsProcessEvent.CGREvent.Tenant,
// args.APIKey, args.AttrArgsProcessEvent.CGREvent.Time); err != nil {
// return
//}
if dS.attrS != nil {
if err = dS.authorize(utils.AttributeSv1GetAttributeForEvent,
args.AttrArgsProcessEvent.CGREvent.Tenant,
args.APIKey, args.AttrArgsProcessEvent.CGREvent.Time); err != nil {
return
}
}
return dS.Dispatch(&args.CGREvent, utils.MetaAttributes,
utils.AttributeSv1GetAttributeForEvent, args.AttrArgsProcessEvent, reply)