Added some more fields to track for inventory; fixed routing issues with the /item/:id route

This commit is contained in:
2022-11-03 12:26:45 -04:00
parent 4a0241dd2b
commit 6751d832fd
4 changed files with 46 additions and 2 deletions

View File

@ -21,6 +21,10 @@ exports.getAdd = async function (req, res) {
exports.postAdd = async function (req, res) {
const item = await Item.create({
name: req.body.item_name,
serialNumber: req.body.item_serial,
skuNumber: req.body.item_sku,
purchasedFrom: req.body.item_purchase_from,
purchasedAt: req.body.item_purchase_date,
manufacturer: req.body.item_manufacturer,
type: req.body.item_type,
});