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