Added a record limiter to the main home view
This commit is contained in:
parent
5f00cf0edd
commit
01149d8da7
@ -3,7 +3,12 @@ const Item = db.items;
|
||||
|
||||
// GET - /
|
||||
exports.getIndex = async function (req, res) {
|
||||
let items = await Item.findAll({});
|
||||
let items = await Item.findAll({
|
||||
limit: 10,
|
||||
order: [
|
||||
['updatedAt', 'DESC'],
|
||||
]
|
||||
});
|
||||
|
||||
res.render('index.twig', {
|
||||
inventory: items,
|
||||
|
Loading…
Reference in New Issue
Block a user