rawlinp commented on a change in pull request #3081: Fixes missing 
deliveryservice data fields from the servers/deliveryservices endpoint.
URL: https://github.com/apache/trafficcontrol/pull/3081#discussion_r239230824
 
 

 ##########
 File path: traffic_ops/traffic_ops_golang/deliveryservice/servers/servers.go
 ##########
 @@ -472,106 +473,85 @@ func dssSelectQuery() string {
 
 type TODSSDeliveryService struct {
        ReqInfo *api.APIInfo `json:"-"`
-       tc.DSSDeliveryService
+       tc.DeliveryServiceNullable
 }
 
 func (dss *TODSSDeliveryService) APIInfo() *api.APIInfo {
        return dss.ReqInfo
 }
 
 func TypeSingleton(reqInfo *api.APIInfo) api.Reader {
-       return &TODSSDeliveryService{reqInfo, tc.DSSDeliveryService{}}
+       return &TODSSDeliveryService{reqInfo, tc.DeliveryServiceNullable{}}
 }
 
 // Read shows all of the delivery services associated with the specified 
server.
 func (dss *TODSSDeliveryService) Read() ([]interface{}, error, error, int) {
-       orderby := dss.APIInfo().Params["orderby"]
-       if orderby == "" {
-               orderby = "deliveryService"
+       returnable := []interface{}{}
+       params := make(map[string]string)
+       tx := dss.APIInfo().Tx.Tx
+       user := dss.APIInfo().User
+
+       if _, ok := params["orderby"]; !ok {
 
 Review comment:
   Shouldn't this be checking and updating `dss.APIInfo().Params["orderby"]`?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to