dewrich closed pull request #2094: removes path params from ds request 
endpoints per api guidelines
URL: https://github.com/apache/incubator-trafficcontrol/pull/2094
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/traffic_ops/traffic_ops_golang/routes.go 
b/traffic_ops/traffic_ops_golang/routes.go
index 1551d2c6c..4b042a917 100644
--- a/traffic_ops/traffic_ops_golang/routes.go
+++ b/traffic_ops/traffic_ops_golang/routes.go
@@ -108,19 +108,17 @@ func Routes(d ServerData) ([]Route, http.Handler, error) {
 
                //Delivery service requests
                {1.3, http.MethodGet, `deliveryservice_requests/?(\.json)?$`, 
api.ReadHandler(dsrequest.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
-               {1.3, http.MethodGet, `deliveryservice_requests/{id}$`, 
api.ReadHandler(dsrequest.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
-               {1.3, http.MethodPut, `deliveryservice_requests/{id}$`, 
api.UpdateHandler(dsrequest.GetRefType(), d.DB), auth.PrivLevelPortal, 
Authenticated, nil},
+               {1.3, http.MethodPut, `deliveryservice_requests/?$`, 
api.UpdateHandler(dsrequest.GetRefType(), d.DB), auth.PrivLevelPortal, 
Authenticated, nil},
                {1.3, http.MethodPost, `deliveryservice_requests/?$`, 
api.CreateHandler(dsrequest.GetRefType(), d.DB), auth.PrivLevelPortal, 
Authenticated, nil},
-               {1.3, http.MethodDelete, `deliveryservice_requests/{id}$`, 
api.DeleteHandler(dsrequest.GetRefType(), d.DB), auth.PrivLevelPortal, 
Authenticated, nil},
+               {1.3, http.MethodDelete, `deliveryservice_requests/?$`, 
api.DeleteHandler(dsrequest.GetRefType(), d.DB), auth.PrivLevelPortal, 
Authenticated, nil},
                {1.3, http.MethodPut, `deliveryservice_requests/{id}/assign$`, 
api.UpdateHandler(dsrequest.GetAssignRefType(), d.DB), 
auth.PrivLevelOperations, Authenticated, nil},
                {1.3, http.MethodPut, `deliveryservice_requests/{id}/status$`, 
api.UpdateHandler(dsrequest.GetStatusRefType(), d.DB), auth.PrivLevelPortal, 
Authenticated, nil},
 
                //Delivery service request comments
                {1.3, http.MethodGet, 
`deliveryservice_request_comments/?(\.json)?$`, 
api.ReadHandler(comment.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
-               {1.3, http.MethodGet, `deliveryservice_request_comments/{id}$`, 
api.ReadHandler(comment.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
-               {1.3, http.MethodPut, `deliveryservice_request_comments/{id}$`, 
api.UpdateHandler(comment.GetRefType(), d.DB), auth.PrivLevelPortal, 
Authenticated, nil},
+               {1.3, http.MethodPut, `deliveryservice_request_comments/?$`, 
api.UpdateHandler(comment.GetRefType(), d.DB), auth.PrivLevelPortal, 
Authenticated, nil},
                {1.3, http.MethodPost, `deliveryservice_request_comments/?$`, 
api.CreateHandler(comment.GetRefType(), d.DB), auth.PrivLevelPortal, 
Authenticated, nil},
-               {1.3, http.MethodDelete, 
`deliveryservice_request_comments/{id}$`, 
api.DeleteHandler(comment.GetRefType(), d.DB), auth.PrivLevelPortal, 
Authenticated, nil},
+               {1.3, http.MethodDelete, `deliveryservice_request_comments/?$`, 
api.DeleteHandler(comment.GetRefType(), d.DB), auth.PrivLevelPortal, 
Authenticated, nil},
 
                {1.3, http.MethodGet, `deliveryservices/{xmlID}/urisignkeys$`, 
getURIsignkeysHandler(d.DB, d.Config), auth.PrivLevelAdmin, Authenticated, nil},
                {1.3, http.MethodPost, `deliveryservices/{xmlID}/urisignkeys$`, 
saveDeliveryServiceURIKeysHandler(d.DB, d.Config), auth.PrivLevelAdmin, 
Authenticated, nil},


 

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