You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2022/05/20 20:52:53 UTC

[GitHub] [trafficcontrol] rimashah25 commented on a diff in pull request #6847: Fixed API v4 `/servers` result for query param {profileName}

rimashah25 commented on code in PR #6847:
URL: https://github.com/apache/trafficcontrol/pull/6847#discussion_r878538773


##########
traffic_ops/traffic_ops_golang/server/servers.go:
##########
@@ -974,10 +992,18 @@ func getServers(h http.Header, params map[string]string, tx *sqlx.Tx, user *auth
 		return nil, 0, util.JoinErrs(errs), nil, http.StatusBadRequest, nil
 	}
 
-	countQuery := serverCountQuery + queryAddition + where
+	var queryString, countQueryString string
+	queryString = selectQuery + joinProfileV3
+	countQueryString = serverCountQuery + joinProfileV3
+	if _, ok := params["profileName"]; ok {

Review Comment:
   `profileName` is the query param not `profileNames` and changed if condition.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org