Added a table to display inventory on the home page; fixed the item add route

This commit is contained in:
2022-11-02 14:29:46 -04:00
parent 12770a995d
commit 1b46e7c3fb
4 changed files with 32 additions and 9 deletions

View File

@ -4,6 +4,8 @@ const Item = db.items;
// GET - /
exports.getIndex = async function (req, res) {
let items = await Item.findAll({});
console.log(items);
res.render('index.twig');
res.render('index.twig', {
inventory: items,
});
};