Lint
parent
d7113168ca
commit
2b368769a2
|
@ -254,7 +254,7 @@ const getImages = async (id, req, res, callback) => {
|
||||||
|
|
||||||
const product = await db.products.findOne({ _id: getId(id) });
|
const product = await db.products.findOne({ _id: getId(id) });
|
||||||
if(!product){
|
if(!product){
|
||||||
return[];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
// loop files in /public/uploads/
|
// loop files in /public/uploads/
|
||||||
|
@ -525,7 +525,7 @@ const sortMenu = (menu) => {
|
||||||
menu.items = _.sortBy(menu.items, 'order');
|
menu.items = _.sortBy(menu.items, 'order');
|
||||||
return menu;
|
return menu;
|
||||||
}
|
}
|
||||||
return{};
|
return {};
|
||||||
};
|
};
|
||||||
|
|
||||||
// orders the menu
|
// orders the menu
|
||||||
|
@ -623,7 +623,7 @@ const getData = (req, page, query) => {
|
||||||
|
|
||||||
let skip = 0;
|
let skip = 0;
|
||||||
if(page > 1){
|
if(page > 1){
|
||||||
skip = (page - 1) * numberProducts;
|
skip = (page - 1) * process.env.pageSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!query){
|
if(!query){
|
||||||
|
|
Loading…
Reference in New Issue