Current (non-working-frontend) state
This commit is contained in:
@ -25,7 +25,11 @@ async function get(req: Request, res: Response) {
|
||||
prisma.item
|
||||
.findMany({ skip: (page - 1) * takeSize, take: takeSize }) // Skip the amount of items per page times the page number minus 1; skip has to be (page-1)*takeSize because skip is 0 indexed
|
||||
.then((items) => {
|
||||
res.render(__path + '/src/frontend/items.eta.html', { items: items, currentPage: page, maxPages: pageSize });
|
||||
prisma.storageLocation.findMany({}).then((locations) => {
|
||||
prisma.itemCategory.findMany({}).then((categories) => {
|
||||
res.render(__path + '/src/frontend/items.eta.html', { items: items, currentPage: page, maxPages: pageSize, storeLocs: locations, categories: categories });
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
|
Reference in New Issue
Block a user