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

Fix minor issue in PATCH method of published API resource

parent 9734adeb
Loading
Loading
Loading
Loading
+13 −13
Original line number Diff line number Diff line
@@ -744,24 +744,24 @@ func appServicesByIdPATCH(w http.ResponseWriter, r *http.Request) {
	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,
		},
	}
	// 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
		ApiId:       service.SerInstanceId, // Map SerInstanceId to ApiId
		AefProfiles: []AefProfile{aefProfile_},
		AefProfiles: dsInfo.AefProfiles,
		VendorSpecificUrnetsimeccapifextserviceInfo: &MecServiceInfoCapifExt{
			Serializer:        service.Serializer,
			State:             service.State,