Commit c89a47ca authored by Mubeena Ishaq's avatar Mubeena Ishaq
Browse files

fix if-else logic for PUT method in meep-vis

parent 30852bd9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1336,13 +1336,13 @@ func individualSubscriptionPut(w http.ResponseWriter, r *http.Request) {
			return
		}

		if subscriptionCommon.FilterCriteria == nil {
		if subscription.FilterCriteria == nil {
			log.Error("FilterCriteria should not be null for this subscription type")
			errHandlerProblemDetails(w, "Mandatory attribute FilterCriteria is missing for this subscription type", http.StatusBadRequest)
			return
		}

		if subscriptionCommon.CallbackReference == "" && subscriptionCommon.WebsockNotifConfig.WebsocketUri == "" {
		if subscription.CallbackReference == "" && subscriptionCommon.WebsockNotifConfig.WebsocketUri == "" {
			log.Error("At least one of CallbackReference and WebsockNotifConfig parameters should be present")
			errHandlerProblemDetails(w, "At least one of CallbackReference and WebsockNotifConfig parameters should be present.", http.StatusBadRequest)
			return