@@ -81,8 +81,7 @@ func PreHandleInfluenceDataUpdateNotification(influenceId string, original, modi
8181func SendOnDataChangeNotify (ueId string , notifyItems []models.NotifyItem ) {
8282 defer func () {
8383 if p := recover (); p != nil {
84- // Print stack for panic to log. Fatalf() will let program exit.
85- logger .HttpLog .Fatalf ("panic: %v\n %s" , p , string (debug .Stack ()))
84+ logger .HttpLog .Errorf ("panic: %v\n %s" , p , string (debug .Stack ()))
8685 }
8786 }()
8887
@@ -94,12 +93,15 @@ func SendOnDataChangeNotify(ueId string, notifyItems []models.NotifyItem) {
9493 if ueId == subscriptionDataSubscription .UeId {
9594 onDataChangeNotifyUrl := subscriptionDataSubscription .CallbackReference
9695
97- dataChangeReq := DataRepository.SubscriptionDataSubscriptionsOnDataChangePostRequest {}
98- dataChangeReq .DataChangeNotify .UeId = ueId
99- dataChangeReq .DataChangeNotify .OriginalCallbackReference = []string {
100- subscriptionDataSubscription .OriginalCallbackReference ,
96+ dataChangeReq := DataRepository.SubscriptionDataSubscriptionsOnDataChangePostRequest {
97+ DataChangeNotify : & models.DataChangeNotify {
98+ UeId : ueId ,
99+ OriginalCallbackReference : []string {
100+ subscriptionDataSubscription .OriginalCallbackReference ,
101+ },
102+ NotifyItems : notifyItems ,
103+ },
101104 }
102- dataChangeReq .DataChangeNotify .NotifyItems = notifyItems
103105 rsp , err := client .SubsToNotifyCollectionApi .SubscriptionDataSubscriptionsOnDataChangePost (
104106 context .TODO (), onDataChangeNotifyUrl , & dataChangeReq )
105107
@@ -133,7 +135,6 @@ func SendPolicyDataChangeNotification(policyDataChangeNotification models.Policy
133135 policyDataChangeNotification ,
134136 },
135137 }
136-
137138 rsp , err := client .PolicyDataSubscriptionsCollectionApi .
138139 CreateIndividualPolicyDataSubscriptionPolicyDataChangeNotificationPost (context .TODO (),
139140 policyDataChangeNotificationUrl , & req )
@@ -171,7 +172,6 @@ func SendInfluenceDataUpdateNotification(resUri string, original, modified *mode
171172 req := DataRepository.CreateIndividualInfluenceDataSubscriptionTrafficInfluenceDataChangeNotificationPostRequest {
172173 RequestBody : []interface {}{trafficInfluDataNotif },
173174 }
174-
175175 rsp , err := client .InfluenceDataSubscriptionsCollectionApi .
176176 CreateIndividualInfluenceDataSubscriptionTrafficInfluenceDataChangeNotificationPost (
177177 context .TODO (), influenceDataChangeNotificationUrl , & req )
@@ -190,7 +190,6 @@ func SendInfluenceDataUpdateNotification(resUri string, original, modified *mode
190190 req := DataRepository.CreateIndividualInfluenceDataSubscriptionTrafficInfluenceDataChangeNotificationPostRequest {
191191 RequestBody : []interface {}{trafficInfluDataNotif },
192192 }
193-
194193 rsp , err := client .InfluenceDataSubscriptionsCollectionApi .
195194 CreateIndividualInfluenceDataSubscriptionTrafficInfluenceDataChangeNotificationPost (
196195 context .TODO (), influenceDataChangeNotificationUrl , & req )
0 commit comments