Files

17 lines
435 B
JavaScript
Raw Permalink Normal View History

2022-01-02 15:07:49 -06:00
const { validarNumeroEntero } = require('../../helper/validar');
2021-06-08 22:01:14 -05:00
const Usuario = require('../../db/tablas/Usuario');
const responsable = async (body) => {
2022-01-02 15:07:49 -06:00
const idUsuario = validarNumeroEntero(body.idUsuario, 'id usuario');
2021-06-08 22:01:14 -05:00
return Usuario.findOne({
where: { idUsuario },
}).then((res) => {
delete res.dataValues.password;
delete res.dataValues.idTipoUsuario;
return res;
});
};
module.exports = responsable;