rawlinp commented on a change in pull request #4700:
URL: https://github.com/apache/trafficcontrol/pull/4700#discussion_r433282005
##########
File path: traffic_ops/traffic_ops_golang/server/servers.go
##########
@@ -248,71 +594,103 @@ func getServers(params map[string]string, tx *sqlx.Tx,
user *auth.CurrentUser) (
// don't allow query on ds outside user's tenant
dsID, err := strconv.Atoi(dsIDStr)
if err != nil {
- return nil, errors.New("dsId must be an integer"), nil,
http.StatusNotFound
+ return nil, unfiltered, errors.New("dsId must be an
integer"), nil, http.StatusNotFound
}
userErr, sysErr, _ := tenant.CheckID(tx.Tx, user, dsID)
if userErr != nil || sysErr != nil {
- return nil, errors.New("Forbidden"), sysErr,
http.StatusForbidden
+ return nil, unfiltered, errors.New("forbidden"),
sysErr, http.StatusForbidden
}
// only if dsId is part of params: add join on
deliveryservice_server table
- queryAddition = `
-FULL OUTER JOIN deliveryservice_server dss ON dss.server = s.id
-`
+ queryAddition = "\nFULL OUTER JOIN deliveryservice_server dss
ON dss.server = s.id\n"
Review comment:
That sounds fine to me.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]