ericholguin commented on code in PR #6847:
URL: https://github.com/apache/trafficcontrol/pull/6847#discussion_r878508427
##########
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:
Checking for key here causes an Internal Server Error when making a `GET`
request to: `/api/v3/servers?profileNames={}` normally if a parameter doesn't
exist it is ignored. Changing the check to `if version.Major >= 4 {` like above
should work
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]