shamrickus commented on a change in pull request #4519: Rework deliveryservices/xmlId/:XMLID/sslkeys/delete URL: https://github.com/apache/trafficcontrol/pull/4519#discussion_r395912089
########## File path: traffic_ops/traffic_ops_golang/deliveryservice/keys.go ########## @@ -371,35 +371,57 @@ func base64EncodeCertificate(cert *tc.DeliveryServiceSSLKeysCertificate) { cert.Key = base64.StdEncoding.EncodeToString([]byte(cert.Key)) } +// DeleteSSLKeys deletes a Delivery Service's sslkeys via a DELETE method func DeleteSSLKeys(w http.ResponseWriter, r *http.Request) { + deleteSSLKeys(w, r, false) +} + +// DeleteSSLKeysDeprecated deletes a Delivery Service's sslkeys via a deprecated GET method +func DeleteSSLKeysDeprecated(w http.ResponseWriter, r *http.Request) { + deleteSSLKeys(w, r, true) +} + +func deleteSSLKeys(w http.ResponseWriter, r *http.Request, deprecated bool) { + alt := "DELETE /deliveryservices/xmlId/:xmlid/sslkeys" + writeErr := func(w http.ResponseWriter, r *http.Request, tx *sql.Tx, statusCode int, userErr error, sysErr error, deprecated bool) { Review comment: This function exists in `api.HandleErrOptionalDeprecation` ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services