/updateEquip and /updatePrinter added and working.

This commit is contained in:
alfredojl
2020-09-18 22:08:30 -05:00
parent 061ea3abe1
commit 3b9a9492c2
12 changed files with 307 additions and 2 deletions
+32
View File
@@ -0,0 +1,32 @@
const Inventario = require('../../models/tablas/Inventario');
const Printers = require('../../models/tablas/Printers');
const remove = async(req, res) => {
const noInventario = req.body.noInventario;
await Inventario.destroy({
where: {
noInventario
}
})
.catch(err => res.status(500).json({
ok: false,
err
}));
await Printers.destroy({
where: {
noInventario
}
})
.then(() => res.json({
ok: true,
message: 'Impresora eliminada.'
}))
.catch(err => res.status(500).json({
ok: false,
err
}));
};
module.exports = remove;