Added a record limiter to the main home view

This commit is contained in:
Gregory Ballantine 2022-11-03 20:38:20 -04:00
parent 5f00cf0edd
commit 01149d8da7

View File

@ -3,7 +3,12 @@ const Item = db.items;
// GET - / // GET - /
exports.getIndex = async function (req, res) { 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', { res.render('index.twig', {
inventory: items, inventory: items,