Skip to content

Commit

Permalink
Update admin, customer and restoadmin controller
Browse files Browse the repository at this point in the history
- Include courier column in getOrder
  • Loading branch information
polekstulod committed Aug 8, 2022
1 parent 31e331f commit b1f8b29
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/controllers/admin/orders.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ exports.getOrder = async (req, res) => {
'created',
'order_dishes',
{ model: db.Restaurant, as: 'restaurant', include: ['restaurant_category'] },
'delivery_details',
{ model: db.DeliveryDetails, as: 'delivery_details', include: ['courier'] },
],
});
dataResponse(res, data, 'Order has been retrieved', 'No Order has been retrieved');
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/customer/order.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ exports.getOrder = async (req, res) => {
{ model: db.Dish, as: 'order_dishes', include: ['dish_category'] },
'address',
'restaurant',
'delivery_details',
{ model: db.DeliveryDetails, as: 'delivery_details', include: ['courier'] },
],
});
dataResponse(res, data, 'Order has been retrieved', 'No Order has been retrieved');
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/resto_admin/orders.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ exports.getOrder = async (req, res) => {
{ model: db.Dish, as: 'order_dishes', include: ['dish_category'] },
'address',
'created',
'delivery_details',
{ model: db.DeliveryDetails, as: 'delivery_details', include: ['courier'] },
],
});
dataResponse(res, data, 'Order has been retrieved', 'No Order has been retrieved');
Expand Down

0 comments on commit b1f8b29

Please sign in to comment.