Commit db86f746 authored by M. Hamza's avatar M. Hamza
Browse files

fix if-else logic in v2xMsgPub endpoint in meep-vis

parent 6c40f4c8
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -781,13 +781,9 @@ func V2xMsgPublicationPOST(w http.ResponseWriter, r *http.Request) {
		return
	}

	if *v2xMsgPubReq.MsgType < 1 || *v2xMsgPubReq.MsgType > 255 {
		log.Error("MsgType parameter should be between 1 and 255")
		errHandlerProblemDetails(w, "MsgType parameter should be between 1 and 255 in the request body.", http.StatusBadRequest)
		return
	} else if err != nil {
		log.Error("MsgType parameter should be between 1 and 255")
		errHandlerProblemDetails(w, "MsgType parameter should be between 1 and 255 in the request body.", http.StatusBadRequest)
	if *v2xMsgPubReq.MsgType < 1 || *v2xMsgPubReq.MsgType > 13 {
		log.Error("MsgType parameter should be between 1 and 13")
		errHandlerProblemDetails(w, "MsgType parameter should be between 1 and 13 in the request body.", http.StatusBadRequest)
		return
	}