shamrickus commented on a change in pull request #4644:
URL: https://github.com/apache/trafficcontrol/pull/4644#discussion_r579243748
##########
File path: traffic_ops/traffic_ops_golang/deliveryservice/deliveryservices.go
##########
@@ -278,14 +300,42 @@ func createV30(w http.ResponseWriter, r *http.Request,
inf *api.APIInfo, dsV30 t
}
return nil, status, userErr, sysErr
}
+func createV31(w http.ResponseWriter, r *http.Request, inf *api.APIInfo, dsV31
tc.DeliveryServiceV31) (*tc.DeliveryServiceV31, int, error, error) {
+ tx := inf.Tx.Tx
+ dsNullable := tc.DeliveryServiceNullableV30(dsV31)
+ ds := dsNullable.UpgradeToV4()
+ res, status, userErr, sysErr := createV40(w, r, inf,
tc.DeliveryServiceV40(ds))
+ if res == nil {
Review comment:
I'm just doing what the previous versions of this function did (but
flipped). It looks like if there is an error in createV40, res will always be
nil, otherwise it will have a value.
----------------------------------------------------------------
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]