Commit db07774b authored by M. Rehan Abbasi's avatar M. Rehan Abbasi
Browse files

reformat service info links to be added in redis DB

parent 7e200e20
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)