Commit c28481f7 authored by Ikram Haq's avatar Ikram Haq
Browse files

Add functionality to update the event filter and capif events in subscription

parent 12dc6d6f
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -949,12 +949,12 @@ func applicationsSubscriptionsPUT(w http.ResponseWriter, r *http.Request) {
	// 	sub.Cfg.RequestWebsocketUri = false
	// }
	// Update event filters if provided
	// if updatedSub.EventFilters != nil {
	// 	sub.Cfg.EventFilters = convertEventFiltersToStrings(updatedSub.EventFilters)
	// }
	// if updatedSub.Events != nil {
	// 	sub.Cfg.CapifEvent = convertEventToStrings(updatedSub.Events)
	// }
	if updatedSub.EventFilters != nil {
		sub.Cfg.EventFilters = convertEventFiltersToStrings(updatedSub.EventFilters)
	}
	if updatedSub.Events != nil {
		sub.Cfg.CapifEvent = convertEventToStrings(updatedSub.Events)
	}
	// Update the subscription in the manager
	err = subMgr.UpdateSubscription(sub)
	if err != nil {