ocket8888 commented on a change in pull request #2278: Add TO Go caches/stats 
endpoint
URL: https://github.com/apache/trafficcontrol/pull/2278#discussion_r253951742
 
 

 ##########
 File path: traffic_ops/traffic_ops_golang/routes.go
 ##########
 @@ -103,6 +104,8 @@ func Routes(d ServerData) ([]Route, []RawRoute, 
http.Handler, error) {
                {1.1, http.MethodPost, `asns/?$`, 
api.CreateHandler(asn.GetTypeSingleton()), auth.PrivLevelOperations, 
Authenticated, nil},
                {1.1, http.MethodDelete, `asns/{id}$`, 
api.DeleteHandler(asn.GetTypeSingleton()), auth.PrivLevelOperations, 
Authenticated, nil},
 
+               {1.1, http.MethodGet, `caches/stats/?(\.json)?$`, 
cachesstats.Get, auth.PrivLevelReadOnly, Authenticated, nil},
 
 Review comment:
   I don't think this is unique to this endpoint, but this will allow me to 
`GET` `/api/1.x/caches/stats/.json`. I checked and it seems that the Perl 
allows this, so maybe for that reason alone we don't want to change it, but 
it's weird.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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

Reply via email to