dangogh closed pull request #1951: added routes for PUT/DELETE to /divisions
URL: https://github.com/apache/incubator-trafficcontrol/pull/1951
 
 
   

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 c3450bfdf4..2bb388f9bf 100644
--- a/traffic_ops/traffic_ops_golang/routes.go
+++ b/traffic_ops/traffic_ops_golang/routes.go
@@ -124,7 +124,9 @@ func Routes(d ServerData) ([]Route, http.Handler, error) {
                //Divisions
                {1.3, http.MethodGet, `divisions/?(\.json)?$`, 
api.ReadHandler(division.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
                {1.3, http.MethodGet, `divisions/{id}$`, 
api.ReadHandler(division.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
+               {1.3, http.MethodPut, `divisions/{id}$`, 
api.UpdateHandler(division.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
                {1.3, http.MethodPost, `divisions/?$`, 
api.CreateHandler(division.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+               {1.3, http.MethodDelete, `divisions/{id}$`, 
api.DeleteHandler(division.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
 
                //HwInfo
                {1.2, http.MethodGet, `hwinfo-wip/?(\.json)?$`, 
hwInfoHandler(d.DB), auth.PrivLevelReadOnly, 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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to