Loading go-apps/meep-vis/server/vis.go +7 −7 Original line number Diff line number Diff line Loading @@ -1330,21 +1330,21 @@ func individualSubscriptionPut(w http.ResponseWriter, r *http.Request) { return } if subscription.FilterCriteria.StdOrganization == "" { log.Error("Mandatory StdOrganization parameter should be present") errHandlerProblemDetails(w, "Mandatory attribute StdOrganization is missing in the request body.", http.StatusBadRequest) if subscription.CallbackReference == "" && subscription.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 } if subscription.FilterCriteria == nil { log.Error("FilterCriteria should not be null for this subscription type") log.Error("Mandatory attribute FilterCriteria is missing for this subscription type") errHandlerProblemDetails(w, "Mandatory attribute FilterCriteria is missing for this subscription type", http.StatusBadRequest) return } 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) if subscription.FilterCriteria.StdOrganization == "" { log.Error("Mandatory StdOrganization parameter should be present") errHandlerProblemDetails(w, "Mandatory attribute StdOrganization is missing in the request body.", http.StatusBadRequest) return } Loading Loading
go-apps/meep-vis/server/vis.go +7 −7 Original line number Diff line number Diff line Loading @@ -1330,21 +1330,21 @@ func individualSubscriptionPut(w http.ResponseWriter, r *http.Request) { return } if subscription.FilterCriteria.StdOrganization == "" { log.Error("Mandatory StdOrganization parameter should be present") errHandlerProblemDetails(w, "Mandatory attribute StdOrganization is missing in the request body.", http.StatusBadRequest) if subscription.CallbackReference == "" && subscription.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 } if subscription.FilterCriteria == nil { log.Error("FilterCriteria should not be null for this subscription type") log.Error("Mandatory attribute FilterCriteria is missing for this subscription type") errHandlerProblemDetails(w, "Mandatory attribute FilterCriteria is missing for this subscription type", http.StatusBadRequest) return } 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) if subscription.FilterCriteria.StdOrganization == "" { log.Error("Mandatory StdOrganization parameter should be present") errHandlerProblemDetails(w, "Mandatory attribute StdOrganization is missing in the request body.", http.StatusBadRequest) return } Loading