Files
Miles 45cb9fac99 Lots of updates and added functionality.
Added TODO list to readme as well as instructions.
2025-01-23 10:02:08 +00:00

19 lines
643 B
TypeScript

const express = require('express');
const router = express.Router();
const Boxes = require('../Models/Boxes.ts');
const Inventory = require('../Models/Inventory.ts');
router.get('/', async (req, res) => {
// get boxes and pass them to the
const boxes = await Boxes.findAll({include: Inventory}); // retrieve all inventory records
// await console.log(boxes);
await res.render('boxes', { boxes });
});
router.post('/:skuToEdit', async (req, res) => {
const skuToEdit = req.params.skuToEdit;
// update or retrieve data for this SKU and redirect back to boxes page with updated information
});
module.exports = router;