mattjackson220 commented on a change in pull request #5225:
URL: https://github.com/apache/trafficcontrol/pull/5225#discussion_r514536178



##########
File path: traffic_ops/traffic_ops_golang/routing/routes.go
##########
@@ -420,7 +420,7 @@ func Routes(d ServerData) ([]Route, []RawRoute, 
http.Handler, error) {
 
                //ServiceCategories
                {api.Version{3, 0}, http.MethodGet, `service_categories/?$`, 
api.ReadHandler(&servicecategory.TOServiceCategory{}), auth.PrivLevelReadOnly, 
Authenticated, nil, 1085181543, noPerlBypass},
-               {api.Version{3, 0}, http.MethodPut, 
`service_categories/{name}/?$`, 
api.UpdateHandler(&servicecategory.TOServiceCategory{}), 
auth.PrivLevelOperations, Authenticated, nil, 306369141, noPerlBypass},
+               {api.Version{3, 0}, http.MethodPut, 
`service_categories/{name}/?$`, servicecategory.Update, 
auth.PrivLevelOperations, Authenticated, nil, 306369141, noPerlBypass},

Review comment:
       ill add in validation and changelog entries for it. this was necessary 
because the service category name is the primary key. Using the UpdateHandler 
doesnt work because it has to update using the previous information. So when i 
was using it, it returned that the service category doesnt exist because it was 
looking for the new name




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


Reply via email to