mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-24 16:48:45 +05:00
DispatcherS.AttributeSv1GetAttributeForEvent with auth implementation
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user