ocket8888 commented on code in PR #7736:
URL: https://github.com/apache/trafficcontrol/pull/7736#discussion_r1302483940


##########
traffic_ops/traffic_ops_golang/deliveryservice/keys.go:
##########
@@ -127,16 +127,27 @@ func AddSSLKeys(w http.ResponseWriter, r *http.Request) {
 
        api.CreateChangeLogRawTx(api.ApiChange, "DS: "+*req.DeliveryService+", 
ID: "+strconv.Itoa(dsID)+", ACTION: Added/Updated SSL keys", inf.User, 
inf.Tx.Tx)
 
+       var alerts tc.Alerts
+
        if isUnknownAuth {
-               api.WriteRespAlert(w, r, tc.WarnLevel, "WARNING: SSL keys were 
successfully added for '"+*req.DeliveryService+"', but the input certificate 
may be invalid (certificate is signed by an unknown authority)")
-               return
+               alerts.AddAlert(tc.Alert{
+                       Text:  "WARNING: SSL keys were successfully added for 
'" + *req.DeliveryService + "', but the input certificate may be invalid 
(certificate is signed by an unknown authority)",

Review Comment:
   can we take out the "WARNING: " and "Successfully " while we're at it? That 
information is given to you by the Level. Imagine logging these prefixed by 
their level:
   > WARNING: WARNING: SSL keys were successfully added for 'something', but 
the input certificate may be invalid (certificate is signed by an unknown 
authority)
   > SUCCESS: Successfully added ssl keys for something



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to