Remove debugging

master
Mark Moffat 2019-07-12 17:29:03 +09:30
parent 72b88eee9e
commit 8f2c1f4323
1 changed files with 0 additions and 4 deletions

View File

@ -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));
@ -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,