mhoppa commented on a change in pull request #4397: Fixed /api/2.0/roles always
returning empty array
URL: https://github.com/apache/trafficcontrol/pull/4397#discussion_r379104175
##########
File path: traffic_ops/traffic_ops_golang/role/roles.go
##########
@@ -164,6 +164,11 @@ func (role *TORole) Read() ([]interface{}, error, error,
int) {
if userErr != nil || sysErr != nil {
return nil, userErr, sysErr, errCode
}
+
+ if version.Major > 1 {
+ return vals, nil, nil, http.StatusOK
Review comment:
this needs to fill in the capabilities else it will return nil for
capabilities
----------------------------------------------------------------
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]
With regards,
Apache Git Services