Loading go-apps/meep-vis/server/vis.go +12 −12 Original line number Original line Diff line number Diff line Loading @@ -1301,6 +1301,18 @@ func individualSubscriptionPut(w http.ResponseWriter, r *http.Request) { return return } } if subscriptionCommon.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 } if subscriptionCommon.FilterCriteria == nil { 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 } link := subscriptionCommon.Links link := subscriptionCommon.Links if link == nil || link.Self == nil { if link == nil || link.Self == nil { log.Error("Mandatory Link parameter not present") log.Error("Mandatory Link parameter not present") Loading Loading @@ -1330,18 +1342,6 @@ func individualSubscriptionPut(w http.ResponseWriter, r *http.Request) { return return } } 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("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.FilterCriteria.StdOrganization == "" { if subscription.FilterCriteria.StdOrganization == "" { log.Error("Mandatory StdOrganization parameter should be present") log.Error("Mandatory StdOrganization parameter should be present") errHandlerProblemDetails(w, "Mandatory attribute StdOrganization is missing in the request body.", http.StatusBadRequest) errHandlerProblemDetails(w, "Mandatory attribute StdOrganization is missing in the request body.", http.StatusBadRequest) Loading Loading
go-apps/meep-vis/server/vis.go +12 −12 Original line number Original line Diff line number Diff line Loading @@ -1301,6 +1301,18 @@ func individualSubscriptionPut(w http.ResponseWriter, r *http.Request) { return return } } if subscriptionCommon.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 } if subscriptionCommon.FilterCriteria == nil { 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 } link := subscriptionCommon.Links link := subscriptionCommon.Links if link == nil || link.Self == nil { if link == nil || link.Self == nil { log.Error("Mandatory Link parameter not present") log.Error("Mandatory Link parameter not present") Loading Loading @@ -1330,18 +1342,6 @@ func individualSubscriptionPut(w http.ResponseWriter, r *http.Request) { return return } } 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("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.FilterCriteria.StdOrganization == "" { if subscription.FilterCriteria.StdOrganization == "" { log.Error("Mandatory StdOrganization parameter should be present") log.Error("Mandatory StdOrganization parameter should be present") errHandlerProblemDetails(w, "Mandatory attribute StdOrganization is missing in the request body.", http.StatusBadRequest) errHandlerProblemDetails(w, "Mandatory attribute StdOrganization is missing in the request body.", http.StatusBadRequest) Loading