This commit is contained in:
KIKIN
2020-09-27 20:13:38 -05:00
2 changed files with 31 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
const sequelize = require('../../config/sequelize.conf');
const { QueryTypes } = require('sequelize');
const tipoPrinters = async(req, res) => {
// res.json({
// message: "Listo"
// });
await sequelize.query(`
SELECT idTipo, tipo
FROM TIPO`, { type: QueryTypes.SELECT })
.then(tipoPrinters => {
return res.json({
tipoPrinters
})
})
.catch(error => res.status(500).json({
error
}));
}
module.exports = tipoPrinters;