From 1aafa095d6f2e0ca14b2feffaf884579200a015d Mon Sep 17 00:00:00 2001 From: Ikram Ul Haq Date: Thu, 24 Oct 2024 09:25:29 +0500 Subject: [PATCH] Clean the code --- .../server/capif-mgmt/service-mgmt.go | 30 +------------------ 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/go-apps/meep-app-enablement/server/capif-mgmt/service-mgmt.go b/go-apps/meep-app-enablement/server/capif-mgmt/service-mgmt.go index 4a1692335..afc2fd35a 100644 --- a/go-apps/meep-app-enablement/server/capif-mgmt/service-mgmt.go +++ b/go-apps/meep-app-enablement/server/capif-mgmt/service-mgmt.go @@ -521,7 +521,6 @@ func appServicesByIdPUT(w http.ResponseWriter, r *http.Request) { } // Current implementation only supports state parameter change; - // Make sure none of the other service information fields have changed state := *_sInfo.State *_sInfo.State = *sInfoPrev.State // isLocal is only set in responses, subscriptions and notifications; @@ -686,11 +685,6 @@ func appServicesByIdPATCH(w http.ResponseWriter, r *http.Request) { } // Current implementation only supports state parameter change; - // Make sure none of the other service information fields have changed - // state := *_sInfo.State - // *_sInfo.State = *sInfoPrev.State - // isLocal is only set in responses, subscriptions and notifications; - // Ignore this field while comparing the previous & new service info structs _sInfo.IsLocal = sInfoPrev.IsLocal // Compare service information as JSON strings @@ -740,23 +734,8 @@ func appServicesByIdPATCH(w http.ResponseWriter, r *http.Request) { // Map ServiceInfoList to ServiceApiDescription list serviceApiDescriptions := make([]ServiceApiDescription, 0) - // Assuming _sInfo is an instance of ServiceInfo service := _sInfo - // Create an AefProfile from TransportInfo inside ServiceInfo - // aefProfile_ := AefProfile{ - // AefId: service.TransportInfo.Id, - // Versions: []string{service.Version}, // Assuming Version is a string - // InterfaceDescriptions: service.TransportInfo.Endpoint, - // VendorSpecificUrnetsimeccapifexttransportInfo: &MecTransportInfoCapifExt{ - // Name: service.TransportInfo.Name, - // Type_: service.TransportInfo.Type_, - // Protocol: service.TransportInfo.Protocol, - // Version: service.TransportInfo.Version, - // Security: service.TransportInfo.Security, - // }, - // } - // Create the ServiceApiDescription and populate it with data from ServiceInfo apiDesc := ServiceApiDescription{ ApiName: service.SerName, // Map SerName to ApiName @@ -1107,14 +1086,7 @@ func applicationsSubscriptionsPUT(w http.ResponseWriter, r *http.Request) { if updatedSub.NotificationDestination != "" { sub.Cfg.NotifyUrl = updatedSub.NotificationDestination } - // if updatedSub.RequestTestNotification { - // sub.Cfg.RequestTestNotif = true - // } - // if updatedSub.RequestWebsocketUri { - // sub.Cfg.RequestWebsocketUri = true - // } else { - // sub.Cfg.RequestWebsocketUri = false - // } + // Update event filters if provided if updatedSub.EventFilters != nil { sub.Cfg.EventFilters = convertEventFiltersToStrings(updatedSub.EventFilters) -- GitLab