You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2018/05/30 20:41:44 UTC
[GitHub] DylanVolz commented on a change in pull request #2341: Add TO Go
Divisions name
DylanVolz commented on a change in pull request #2341: Add TO Go Divisions name
URL: https://github.com/apache/incubator-trafficcontrol/pull/2341#discussion_r191915871
##########
File path: traffic_ops/traffic_ops_golang/routes.go
##########
@@ -122,6 +122,7 @@ func Routes(d ServerData) ([]Route, []RawRoute, http.Handler, error) {
{1.1, http.MethodPut, `divisions/{id}$`, api.UpdateHandler(division.GetRefType(), d.DB), auth.PrivLevelOperations, Authenticated, nil},
{1.1, http.MethodPost, `divisions/?$`, api.CreateHandler(division.GetRefType(), d.DB), auth.PrivLevelOperations, Authenticated, nil},
{1.1, http.MethodDelete, `divisions/{id}$`, api.DeleteHandler(division.GetRefType(), d.DB), auth.PrivLevelOperations, Authenticated, nil},
+ {1.1, http.MethodGet, `divisions/name/{name}/?(\.json)?$`, division.GetName(d.DB.DB), auth.PrivLevelReadOnly, Authenticated, nil},
Review comment:
Note: this pr could only be this line:
`{1.1, http.MethodGet, `divisions/name/{name}?$`, api.ReadHandler(division.GetRefType(), d.DB), auth.PrivLevelReadOnly, Authenticated, nil}`
I also think it shouldn't have the .json ending as I don't think the perl endpoint supports it with a path parameter.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services