Merge pull request 'token correos' (#30) from develop into master
Reviewed-on: #30
This commit was merged in pull request #30.
This commit is contained in:
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"Nombre": "Sistema de Registro Eventos",
|
||||||
|
"ip": "192.168.0.10",
|
||||||
|
"email": "registro-eventos@acatlan.unam.mx",
|
||||||
|
"email_password": "c4Gl-06k9%h",
|
||||||
|
"password": "E5cCF5b-92d",
|
||||||
|
"clientId": "963087784448-i4pg060bkumkhk75r4po5esaglij6dq2.apps.googleusercontent.com",
|
||||||
|
"refreshToken": "1//04-ba9LCW4EQ9CgYIARAAGAQSNwF-L9IrOlLXH2Piku5W37ujhF4N3sBMMJqTAvXhjzKiYy7ckuOoA6sIcBZpu-d-E7-no286kzU",
|
||||||
|
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzaXN0ZW1hSWQiOjIsIm5vbWJyZSI6IlNpc3RlbWEgZGUgUmVnaXN0cm8gRXZlbnRvcyIsImlwIjoiMTkyLjE2OC4wLjEwIiwiaWF0IjoxNzUxMTU1OTU0LCJleHAiOjE3NTEyNDIzNTR9.9JzBnjlkw9SqTAlpN2UfsWwLS7HzeIyosfRCNA3Lj0Y%"
|
||||||
|
}
|
||||||
@@ -273,31 +273,39 @@ export class CuestionarioRespondidoService {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
await axios.post(`${urlApiCorreos}/mail/send`, {
|
await axios.post(
|
||||||
to: participante.correo,
|
`${urlApiCorreos}/mail/send`,
|
||||||
subject: `Evento: ${cuestionario.evento?.nombre_evento}`,
|
{
|
||||||
fecha_recibido: '2025-03-10T12:00:00Z',
|
to: participante.correo,
|
||||||
html: generarHtmlCorreoAsistencia({
|
subject: `Evento: ${cuestionario.evento?.nombre_evento}`,
|
||||||
nombreForm: cuestionario.nombre_form,
|
fecha_recibido: '2025-03-10T12:00:00Z',
|
||||||
nombreEvento: cuestionario.evento?.nombre_evento,
|
html: generarHtmlCorreoAsistencia({
|
||||||
correo: participante.correo,
|
nombreForm: cuestionario.nombre_form,
|
||||||
fechaRegistro: new Date().toLocaleString(),
|
nombreEvento: cuestionario.evento?.nombre_evento,
|
||||||
fechaInicioEvento: cuestionario.evento?.fecha_inicio
|
correo: participante.correo,
|
||||||
? new Date(cuestionario.evento.fecha_inicio).toLocaleString()
|
fechaRegistro: new Date().toLocaleString(),
|
||||||
: undefined,
|
fechaInicioEvento: cuestionario.evento?.fecha_inicio
|
||||||
fechaFinEvento: cuestionario.evento?.fecha_fin
|
? new Date(cuestionario.evento.fecha_inicio).toLocaleString()
|
||||||
? new Date(cuestionario.evento.fecha_fin).toLocaleString()
|
: undefined,
|
||||||
: undefined,
|
fechaFinEvento: cuestionario.evento?.fecha_fin
|
||||||
}),
|
? new Date(cuestionario.evento.fecha_fin).toLocaleString()
|
||||||
adjuntos: [
|
: undefined,
|
||||||
{
|
}),
|
||||||
filename: 'qr.png',
|
adjuntos: [
|
||||||
content: qrBuffer.toString('base64'),
|
{
|
||||||
encoding: 'base64',
|
filename: 'qr.png',
|
||||||
cid: 'qrCode',
|
content: qrBuffer.toString('base64'),
|
||||||
|
encoding: 'base64',
|
||||||
|
cid: 'qrCode',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
token: process.env.SYSTEM_TOKEN_API_CORREOS,
|
||||||
},
|
},
|
||||||
],
|
},
|
||||||
});
|
);
|
||||||
|
|
||||||
console.log(`Correo enviado exitosamente a ${participante.correo}`);
|
console.log(`Correo enviado exitosamente a ${participante.correo}`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user