Loading go-apps/meep-vis/server/vis.go +8 −8 Original line number Diff line number Diff line Loading @@ -771,8 +771,6 @@ func subscriptionsPost(w http.ResponseWriter, r *http.Request) { return } v2xSubscription.Links = link // Validating mandatory parameters provided in the request body if v2xSubscription.SubscriptionType == "" { log.Error("Mandatory SubscriptionType parameter should be present") Loading @@ -780,6 +778,12 @@ func subscriptionsPost(w http.ResponseWriter, r *http.Request) { return } if v2xSubscription.Links != nil { log.Error("Links attribute should not be present in request body") errHandlerProblemDetails(w, "Links attribute should not be present in request body.", http.StatusBadRequest) return } if v2xSubscription.SubscriptionType != "V2xMsgSubscription" { log.Error("SubscriptionType should be set to V2xMsgSubscription") errHandlerProblemDetails(w, "SubscriptionType should be set to V2xMsgSubscription in the request body.", http.StatusBadRequest) Loading @@ -798,12 +802,6 @@ func subscriptionsPost(w http.ResponseWriter, r *http.Request) { return } if v2xSubscription.Links != nil { log.Error("Links attribute should not be present in request body") errHandlerProblemDetails(w, "Links attribute should not be present in request body.", http.StatusBadRequest) return } for _, msgTypeString := range v2xSubscription.FilterCriteria.MsgType { msgTypeInt, _ := strconv.Atoi(msgTypeString) if msgTypeInt < 1 && msgTypeInt > 255 { Loading @@ -813,6 +811,8 @@ func subscriptionsPost(w http.ResponseWriter, r *http.Request) { } } v2xSubscription.Links = link registerV2xSub(&v2xSubscription, subsIdStr) _ = rc.JSONSetEntry(baseKey+"subscriptions:"+subsIdStr, ".", convertV2xMsgSubscriptionToJson(&v2xSubscription)) Loading Loading
go-apps/meep-vis/server/vis.go +8 −8 Original line number Diff line number Diff line Loading @@ -771,8 +771,6 @@ func subscriptionsPost(w http.ResponseWriter, r *http.Request) { return } v2xSubscription.Links = link // Validating mandatory parameters provided in the request body if v2xSubscription.SubscriptionType == "" { log.Error("Mandatory SubscriptionType parameter should be present") Loading @@ -780,6 +778,12 @@ func subscriptionsPost(w http.ResponseWriter, r *http.Request) { return } if v2xSubscription.Links != nil { log.Error("Links attribute should not be present in request body") errHandlerProblemDetails(w, "Links attribute should not be present in request body.", http.StatusBadRequest) return } if v2xSubscription.SubscriptionType != "V2xMsgSubscription" { log.Error("SubscriptionType should be set to V2xMsgSubscription") errHandlerProblemDetails(w, "SubscriptionType should be set to V2xMsgSubscription in the request body.", http.StatusBadRequest) Loading @@ -798,12 +802,6 @@ func subscriptionsPost(w http.ResponseWriter, r *http.Request) { return } if v2xSubscription.Links != nil { log.Error("Links attribute should not be present in request body") errHandlerProblemDetails(w, "Links attribute should not be present in request body.", http.StatusBadRequest) return } for _, msgTypeString := range v2xSubscription.FilterCriteria.MsgType { msgTypeInt, _ := strconv.Atoi(msgTypeString) if msgTypeInt < 1 && msgTypeInt > 255 { Loading @@ -813,6 +811,8 @@ func subscriptionsPost(w http.ResponseWriter, r *http.Request) { } } v2xSubscription.Links = link registerV2xSub(&v2xSubscription, subsIdStr) _ = rc.JSONSetEntry(baseKey+"subscriptions:"+subsIdStr, ".", convertV2xMsgSubscriptionToJson(&v2xSubscription)) Loading