using cuestionario2 has atribute, create credentials for testing

This commit is contained in:
Your Name
2025-02-13 13:57:28 -05:00
parent f89b7e05db
commit 7bef28e60f
22 changed files with 251 additions and 39 deletions
+2
View File
@@ -56,7 +56,9 @@ const admin = async (body) => {
'vistoBuenoAcatlan',
'createdAt',
'idCuestionarioAlumno',
'idCuestionarioAlumno2',
'idCuestionarioPrograma',
'idCuestionarioPrograma2'
],
}).then((res) => {
if (!res) throw new Error('No existe este servicio social.');
+1
View File
@@ -46,6 +46,7 @@ const alumno = async (body) => {
'profesor',
'createdAt',
'idCuestionarioAlumno',
'idCuestionarioAlumno2'
],
});
})
+4 -2
View File
@@ -24,12 +24,14 @@ const cartaTermino = async (body, file) => {
switch (res.idStatus) {
case 4:
case 8:
return drive.uploadFile(
return drive.uploadFile(
path,
`Carta_Termino.pdf`,
'application/pdf',
res.carpeta
);
);
//return "carta de termino"
case 1:
case 2:
case 3:
+3 -2
View File
@@ -24,12 +24,13 @@ const informeGlobal = async (body, file) => {
switch (res.idStatus) {
case 4:
case 9:
return drive.uploadFile(
return drive.uploadFile(
path,
`Informe_Global.pdf`,
'application/pdf',
res.carpeta
);
);
// return "informe global"
case 1:
case 2:
case 3:
+2 -2
View File
@@ -79,7 +79,7 @@ const nuevo = async (body, file) => {
.then((servicio) => {
let carpeta = '';
drive
drive
.mkDir(numeroCuenta)
.then((res) => {
carpeta = res;
@@ -95,7 +95,7 @@ const nuevo = async (body, file) => {
{ carpeta, cartaAceptacion: res },
{ where: { idServicio: servicio.idServicio } }
)
);
);
return { message: `Se Pre-Registro correctamente a este alumno.` };
});
};
+4 -1
View File
@@ -12,7 +12,9 @@ const registro = async (body) => {
body.idServicio,
'id servicio'
);
const password = encriptar.generarPassword();
//const password = encriptar.generarPassword(); // esta genera la contraseña
let pass = 'qwertyui'
const password = pass //encriptar.encriptar(pass)
let correo = {};
let idUsuario;
@@ -58,6 +60,7 @@ const registro = async (body) => {
.then((res) => ({
message:
'Se cambio de estatus correctamente y se envio un correo al alumno con sus credenciales.',
pass
}));
};
@@ -78,13 +78,19 @@ const registroValidado = async (body) => {
gmail(correoResponsable.subject, emailResponsable, correoResponsable.msj)
)
.then((res) =>
Servicio.update(
{
let tempStatus = 3
if (process.env.MODE == "pruebas") tempStatus = 4
return Servicio.update(
// Producción
{ idStatus: 3, direccion, telefono, fechaNacimiento },
// { idStatus: 3, direccion, telefono, fechaNacimiento },
// Pruebas
// { idStatus: 4, direccion, telefono, fechaNacimiento },
{ idStatus: tempStatus, direccion, telefono, fechaNacimiento },
{ where: { idServicio } }
)
}
)
.then((res) => ({
message: 'Haz terminado el registro de tu Servicio Social correctamente.',
@@ -57,6 +57,7 @@ const serviciosResponsable = async (body) => {
'cartaTermino',
'createdAt',
'idCuestionarioPrograma',
'idCuestionarioPrograma2'
],
order: [['updatedAt', 'DESC']],
limit: 25,