Estable
This commit is contained in:
@@ -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,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -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: [
|
||||
|
||||
@@ -13,7 +13,7 @@ Usuario.init(
|
||||
autoIncrement: true,
|
||||
},
|
||||
numeroCuenta: {
|
||||
type: DataTypes.STRING(10),
|
||||
type: DataTypes.STRING(9),
|
||||
allowNull: false,
|
||||
unique: true,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user