Commit 0af343a9 authored by Ayesha Ayub's avatar Ayesha Ayub
Browse files

fix minor issue in PUT method in MTS

parent 28ec84b0
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -684,7 +684,7 @@ func mtsSessionPost(w http.ResponseWriter, r *http.Request) {

	if requestBody.TrafficDirection != "00" && requestBody.TrafficDirection != "01" && requestBody.TrafficDirection != "10" {
		log.Error("Valid trafficDirection value should be provided")
		errHandlerProblemDetails(w, "Valid trafficDirection value shoudl be provided in the request body.", http.StatusBadRequest)
		errHandlerProblemDetails(w, "Valid trafficDirection value should be provided in the request body.", http.StatusBadRequest)
		return
	}

@@ -1146,7 +1146,7 @@ func mtsSessionPut(w http.ResponseWriter, r *http.Request) {
	if requestBodyPut.TrafficDirection != "" {
		if requestBodyPut.TrafficDirection != "00" && requestBodyPut.TrafficDirection != "01" && requestBodyPut.TrafficDirection != "10" {
			log.Error("Valid trafficDirection value should be provided")
			errHandlerProblemDetails(w, "Valid trafficDirection value shoudl be provided in the request body.", http.StatusBadRequest)
			errHandlerProblemDetails(w, "Valid trafficDirection value should be provided in the request body.", http.StatusBadRequest)
			return
		}
	} else {
@@ -1155,12 +1155,6 @@ func mtsSessionPut(w http.ResponseWriter, r *http.Request) {
		return
	}

	if requestBodyPut.AppName == "" {
		if storedMtsSession.AppName != "" {
			requestBodyPut.AppName = storedMtsSession.AppName
		}
	}

	// timestamp to send in response
	seconds := time.Now().Unix()
	nanoseconds := time.Now().UnixNano()