Commit 0fb81c9a authored by muhammadh's avatar muhammadh
Browse files

Merge branch 'STF625_MEC011_2.2.1' of...

Merge branch 'STF625_MEC011_2.2.1' of https://forge.etsi.org/rep/mec/AdvantEDGE into STF625_MEC011_2.2.1
parents 09734fe7 db07774b
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -299,17 +299,18 @@ func appServicesPOST(w http.ResponseWriter, r *http.Request) {
		// although IsLocal is reevaluated when a query is replied to, value stored in sInfo as is for now
		IsLocal: sInfoPost.IsLocal,
	}
	sInfo.Links = &ServiceInfoLinks{
		Self: &LinkType{
			Href: hostUrl.String() + basePath + "applications/" + appId + "/services/" + sInfo.SerInstanceId,
		},
	}

	err, retCode := setService(appId, sInfo, ServiceAvailabilityNotificationChangeType_ADDED)
	if err != nil {
		log.Error(err.Error())
		errHandlerProblemDetails(w, err.Error(), retCode)
		return
	}
	sInfo.Links = &ServiceInfoLinks{
		Self: &LinkType{
			Href: hostUrl.String() + basePath + "applications/" + appId + "/services/" + sInfo.SerInstanceId,
		},
	}

	// Send response
	w.Header().Set("Location", hostUrl.String()+basePath+"applications/"+appId+"/services/"+sInfo.SerInstanceId)