fix
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user