ocket8888 commented on a change in pull request #4700:
URL: https://github.com/apache/trafficcontrol/pull/4700#discussion_r432793472
##########
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:
I don't much care about multiline vs `\n`, I just don't like not being
able to fold code. I can put it back to using <kbd>`</kbd> strings but I'd like
to add extra indentation in that case so that it clearly, visually falls within
its containing block.
----------------------------------------------------------------
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]