ocket8888 commented on a change in pull request #4426: Deprecate GET 
cdns/name/:name & GET cdns/:id
URL: https://github.com/apache/trafficcontrol/pull/4426#discussion_r385231372
 
 

 ##########
 File path: traffic_ops/traffic_ops_golang/routing/routes.go
 ##########
 @@ -594,13 +592,13 @@ func Routes(d ServerData) ([]Route, []RawRoute, 
http.Handler, error) {
                {api.Version{1, 1}, http.MethodGet, `cdns/routing$`, 
crstats.GetCDNRouting, auth.PrivLevelReadOnly, Authenticated, nil, 66722982, 
perlBypass},
 
                //CDN: CRUD
+               {api.Version{1, 1}, http.MethodGet, 
`cdns/name/{name}/?(\.json)?$`, api.DeprecatedReadHandler(&cdn.TOCDN{}, 
util.StrPtr("GET /cdns with query parameter name")), auth.PrivLevelReadOnly, 
Authenticated, nil, 2135233288, noPerlBypass},
+               {api.Version{1, 1}, http.MethodDelete, `cdns/name/{name}$`, 
cdn.DeleteName, auth.PrivLevelOperations, Authenticated, nil, 408804959, 
noPerlBypass},
                {api.Version{1, 1}, http.MethodGet, `cdns/?(\.json)?$`, 
api.ReadHandler(&cdn.TOCDN{}), auth.PrivLevelReadOnly, Authenticated, nil, 
1345914650, noPerlBypass},
-               {api.Version{1, 1}, http.MethodGet, `cdns/{id}$`, 
api.ReadHandler(&cdn.TOCDN{}), auth.PrivLevelReadOnly, Authenticated, nil, 
2122954075, noPerlBypass},
-               {api.Version{1, 1}, http.MethodGet, 
`cdns/name/{name}/?(\.json)?$`, api.ReadHandler(&cdn.TOCDN{}), 
auth.PrivLevelReadOnly, Authenticated, nil, 2135233288, noPerlBypass},
+               {api.Version{1, 1}, http.MethodGet, `cdns/{id}$`, 
api.DeprecatedReadHandler(&cdn.TOCDN{}, util.StrPtr("GET /cdns with query 
parameter id")), auth.PrivLevelReadOnly, Authenticated, nil, 2122954075, 
noPerlBypass},
                {api.Version{1, 1}, http.MethodPut, `cdns/{id}$`, 
api.UpdateHandler(&cdn.TOCDN{}), auth.PrivLevelOperations, Authenticated, nil, 
549326357, noPerlBypass},
                {api.Version{1, 1}, http.MethodPost, `cdns/?$`, 
api.CreateHandler(&cdn.TOCDN{}), auth.PrivLevelOperations, Authenticated, nil, 
24013912, noPerlBypass},
                {api.Version{1, 1}, http.MethodDelete, `cdns/{id}$`, 
api.DeleteHandler(&cdn.TOCDN{}), auth.PrivLevelOperations, Authenticated, nil, 
1595587002, noPerlBypass},
-               {api.Version{1, 1}, http.MethodDelete, `cdns/name/{name}$`, 
cdn.DeleteName, auth.PrivLevelOperations, Authenticated, nil, 408804959, 
noPerlBypass},
 
 Review comment:
   I'll check try to make sure routing is unaffected, but hopefully you're right

----------------------------------------------------------------
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

Reply via email to