Commit b92126f9 authored by Simon Pastor's avatar Simon Pastor
Browse files

commenting appInsId code in rnis rather than forcing an empty value

parent 86bf5a5a
Loading
Loading
Loading
Loading
+20 −18
Original line number Diff line number Diff line
@@ -1551,11 +1551,11 @@ func measRepUeReportSubscriptionsDELETE(w http.ResponseWriter, r *http.Request)
func plmnInfoGET(w http.ResponseWriter, r *http.Request) {

	w.Header().Set("Content-Type", "application/json; charset=UTF-8")
	u, _ := url.Parse(r.URL.String())
	log.Info("url: ", u.RequestURI())
	q := u.Query()
	appInsId := q.Get("app_ins_id")
	appInsIdArray := strings.Split(appInsId, ",")
	//u, _ := url.Parse(r.URL.String())
	//log.Info("url: ", u.RequestURI())
	//q := u.Query()
	//appInsId := q.Get("app_ins_id")
	//appInsIdArray := strings.Split(appInsId, ",")

	var response InlineResponse2001
	atLeastOne := false
@@ -1565,10 +1565,11 @@ func plmnInfoGET(w http.ResponseWriter, r *http.Request) {
	var timeStamp TimeStamp
	timeStamp.Seconds = int32(seconds)

	//forcing to ignore the appInsId parameter, while keeping the comparison code if turned on again
	appInsId = ""
	//forcing to ignore the appInsId parameter
	//commenting the check but keeping the code

	//if AppId is set, we return info as per AppIds, otherwise, we return the domain info only
	if appInsId != "" {
	/*if appInsId != "" {

		for _, meAppName := range appInsIdArray {
			meAppName = strings.TrimSpace(meAppName)
@@ -1592,6 +1593,7 @@ func plmnInfoGET(w http.ResponseWriter, r *http.Request) {
			}
		}
	} else {
	*/
	keyName := baseKey + "DOM:*"
	err := rc.ForEachJSONEntry(keyName, populatePlmnInfo, &response)
	if err != nil {
@@ -1602,7 +1604,7 @@ func plmnInfoGET(w http.ResponseWriter, r *http.Request) {
	if len(response.PlmnInfo) > 0 {
		atLeastOne = true
	}
	}
	//}

	if atLeastOne {
		jsonResponse, err := json.Marshal(response)