This commit is contained in:
Andres2908
2022-01-27 17:16:57 -06:00
parent cbd51968a1
commit 494e7380f3
4 changed files with 8 additions and 8 deletions
+1
View File
@@ -12,6 +12,7 @@ const escolares = async (body) => {
}).then((res) => {
if (!res) {
return Usuario.create({
idUsuario: body.idUsuario,
numeroCuenta: body.numeroCuenta,
nombre: body.nombre,
semestre: 8,
@@ -1,5 +1,8 @@
const moment = require('moment');
const { validarNumeroEntero } = require('../../helper/validar');
const {
validarNumeroEntero,
validarNumeroCuenta,
} = require('../../helper/validar');
const dbPath = '../../db/tablas';
const Carrera = require(`${dbPath}/Carrera`);
const Inscripcion = require(`${dbPath}/Inscripcion`);
@@ -16,7 +19,7 @@ const inscripcion = async (body) => {
monto: body.monto,
idArea,
fechaIncripcion: ahora.format(),
fechaTicket: ahora.format(),
fechaTicket: body.fechaTicket,
idFechaInscripcion: body.idFechaInscripcion,
});
};
+1 -5
View File
@@ -8,11 +8,7 @@ const inscripciones = async (body) => {
return Inscripcion.findOne({
where: { idUsuario: body.idUsuario },
}).then((res) => {
const noInscripcion = {
status: 0,
message: 'Usuario no Inscrito',
};
if (!res) return noInscripcion;
if (!res) return;
return Inscripcion.findAll({
where: { idUsuario: body.idUsuario },
attributes: [
+1 -1
View File
@@ -13,7 +13,7 @@ Usuario.init(
autoIncrement: true,
},
numeroCuenta: {
type: DataTypes.STRING(10),
type: DataTypes.STRING(9),
allowNull: false,
unique: true,
},