You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by oc...@apache.org on 2022/05/23 20:09:04 UTC
[trafficcontrol] branch master updated: Updated select count queries for APIv4 (#6854)
This is an automated email from the ASF dual-hosted git repository.
ocket8888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
The following commit(s) were added to refs/heads/master by this push:
new 4a6db10648 Updated select count queries for APIv4 (#6854)
4a6db10648 is described below
commit 4a6db10648eb9d3677812d20f833f515ff277631
Author: Rima Shah <22...@users.noreply.github.com>
AuthorDate: Mon May 23 14:08:59 2022 -0600
Updated select count queries for APIv4 (#6854)
---
traffic_ops/traffic_ops_golang/server/servers.go | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/traffic_ops/traffic_ops_golang/server/servers.go b/traffic_ops/traffic_ops_golang/server/servers.go
index 76040416da..4637981d98 100644
--- a/traffic_ops/traffic_ops_golang/server/servers.go
+++ b/traffic_ops/traffic_ops_golang/server/servers.go
@@ -996,10 +996,11 @@ func getServers(h http.Header, params map[string]string, tx *sqlx.Tx, user *auth
if version.Major >= 4 {
if _, ok := params["profileName"]; ok {
queryString = selectQuery + `JOIN server_profile sp ON s.id = sp.server`
+ countQueryString = serverCountQuery + `JOIN server_profile sp ON s.id = sp.server`
} else {
queryString = selectQuery + joinProfileV4
+ countQueryString = serverCountQuery + joinProfileV4
}
- countQueryString = serverCountQuery + joinProfileV4
}
countQuery := countQueryString + queryAddition + where