Skip to content

Commit

Permalink
Remove debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Moffat committed Jul 12, 2019
1 parent 72b88ee commit 8f2c1f4
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions routes/order.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ router.get('/admin/orders/filter/:search', restrict, (req, res, next) => {
const searchTerm = req.params.search;
const ordersIndex = req.app.ordersIndex;

console.log('searchTerm', searchTerm);

const lunrIdArray = [];
ordersIndex.search(searchTerm).forEach((id) => {
lunrIdArray.push(common.getId(id.ref));
Expand All @@ -114,13 +112,11 @@ router.get('/admin/orders/filter/:search', restrict, (req, res, next) => {

// If API request, return json
if(req.apiAuthenticated){
console.log('returning json');
return res.status(200).json({
orders
});
}

console.log('returning view');
return res.render('orders', {
title: 'Order results',
orders: orders,
Expand Down

0 comments on commit 8f2c1f4

Please sign in to comment.