termino de la primera fase
This commit is contained in:
Generated
+131
@@ -18,6 +18,11 @@
|
||||
"negotiator": "0.6.2"
|
||||
}
|
||||
},
|
||||
"addressparser": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/addressparser/-/addressparser-1.0.1.tgz",
|
||||
"integrity": "sha1-R6++GiqSYhkdtoOOT9HTm0CCF0Y="
|
||||
},
|
||||
"ansi-regex": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
||||
@@ -42,6 +47,11 @@
|
||||
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
|
||||
"integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
|
||||
},
|
||||
"array-uniq": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.2.tgz",
|
||||
"integrity": "sha1-X8w3OSB3VyPP1k1lxkvvU7+eum0="
|
||||
},
|
||||
"balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
||||
@@ -82,6 +92,36 @@
|
||||
"concat-map": "0.0.1"
|
||||
}
|
||||
},
|
||||
"buildmail": {
|
||||
"version": "3.10.0",
|
||||
"resolved": "https://registry.npmjs.org/buildmail/-/buildmail-3.10.0.tgz",
|
||||
"integrity": "sha1-xoJtcW55RbtvaxQ0tTmF4CmgMVk=",
|
||||
"requires": {
|
||||
"addressparser": "1.0.1",
|
||||
"libbase64": "0.1.0",
|
||||
"libmime": "2.1.0",
|
||||
"libqp": "1.1.0",
|
||||
"nodemailer-fetch": "1.6.0",
|
||||
"nodemailer-shared": "1.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"iconv-lite": {
|
||||
"version": "0.4.13",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.13.tgz",
|
||||
"integrity": "sha1-H4irpKsLFQjoMSrMOTRfNumS4vI="
|
||||
},
|
||||
"libmime": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/libmime/-/libmime-2.1.0.tgz",
|
||||
"integrity": "sha1-Ubx23iKDFh65BRxLyArtcT5P0c0=",
|
||||
"requires": {
|
||||
"iconv-lite": "0.4.13",
|
||||
"libbase64": "0.1.0",
|
||||
"libqp": "1.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"busboy": {
|
||||
"version": "0.3.1",
|
||||
"resolved": "https://registry.npmjs.org/busboy/-/busboy-0.3.1.tgz",
|
||||
@@ -193,6 +233,14 @@
|
||||
"streamsearch": "0.1.2"
|
||||
}
|
||||
},
|
||||
"dkim-signer": {
|
||||
"version": "0.2.2",
|
||||
"resolved": "https://registry.npmjs.org/dkim-signer/-/dkim-signer-0.2.2.tgz",
|
||||
"integrity": "sha1-qoHsBx7u02IngbqpIgRNeADl8wg=",
|
||||
"requires": {
|
||||
"libmime": "^2.0.3"
|
||||
}
|
||||
},
|
||||
"ee-first": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
||||
@@ -393,6 +441,59 @@
|
||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
||||
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
|
||||
},
|
||||
"libbase64": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/libbase64/-/libbase64-0.1.0.tgz",
|
||||
"integrity": "sha1-YjUag5VjrF/1vSbxL2Dpgwu3UeY="
|
||||
},
|
||||
"libmime": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/libmime/-/libmime-2.1.3.tgz",
|
||||
"integrity": "sha1-JQF8pataHpiq2+JyUBfPHUikKgw=",
|
||||
"requires": {
|
||||
"iconv-lite": "0.4.15",
|
||||
"libbase64": "0.1.0",
|
||||
"libqp": "1.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"iconv-lite": {
|
||||
"version": "0.4.15",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.15.tgz",
|
||||
"integrity": "sha1-/iZaIYrGpXz+hUkn6dBMGYJe3es="
|
||||
}
|
||||
}
|
||||
},
|
||||
"libqp": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/libqp/-/libqp-1.1.0.tgz",
|
||||
"integrity": "sha1-9ebgatdLeU+1tbZpiL9yjvHe2+g="
|
||||
},
|
||||
"mailcomposer": {
|
||||
"version": "3.12.0",
|
||||
"resolved": "https://registry.npmjs.org/mailcomposer/-/mailcomposer-3.12.0.tgz",
|
||||
"integrity": "sha1-nF4RiKqOHGLsi4a9Q0aBArY56Pk=",
|
||||
"requires": {
|
||||
"buildmail": "3.10.0",
|
||||
"libmime": "2.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"iconv-lite": {
|
||||
"version": "0.4.13",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.13.tgz",
|
||||
"integrity": "sha1-H4irpKsLFQjoMSrMOTRfNumS4vI="
|
||||
},
|
||||
"libmime": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/libmime/-/libmime-2.1.0.tgz",
|
||||
"integrity": "sha1-Ubx23iKDFh65BRxLyArtcT5P0c0=",
|
||||
"requires": {
|
||||
"iconv-lite": "0.4.13",
|
||||
"libbase64": "0.1.0",
|
||||
"libqp": "1.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"media-typer": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
||||
@@ -521,6 +622,19 @@
|
||||
"tar": "^4.4.2"
|
||||
}
|
||||
},
|
||||
"nodemailer-fetch": {
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/nodemailer-fetch/-/nodemailer-fetch-1.6.0.tgz",
|
||||
"integrity": "sha1-ecSQihwPXzdbc/6IjamCj23JY6Q="
|
||||
},
|
||||
"nodemailer-shared": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/nodemailer-shared/-/nodemailer-shared-1.1.0.tgz",
|
||||
"integrity": "sha1-z1mU4v0mjQD1zw+nZ6CBae2wfsA=",
|
||||
"requires": {
|
||||
"nodemailer-fetch": "1.6.0"
|
||||
}
|
||||
},
|
||||
"nopt": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz",
|
||||
@@ -643,6 +757,14 @@
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
|
||||
"integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ=="
|
||||
},
|
||||
"randomstring": {
|
||||
"version": "1.1.5",
|
||||
"resolved": "https://registry.npmjs.org/randomstring/-/randomstring-1.1.5.tgz",
|
||||
"integrity": "sha1-bfBij3XL1ZMpMNn+OrTpVqGFGMM=",
|
||||
"requires": {
|
||||
"array-uniq": "1.0.2"
|
||||
}
|
||||
},
|
||||
"range-parser": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
|
||||
@@ -746,6 +868,15 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"sendmail": {
|
||||
"version": "1.6.1",
|
||||
"resolved": "https://registry.npmjs.org/sendmail/-/sendmail-1.6.1.tgz",
|
||||
"integrity": "sha512-lIhvnjSi5e5jL8wA1GPP6j2QVlx6JOEfmdn0QIfmuJdmXYGmJ375kcOU0NSm/34J+nypm4sa1AXrYE5w3uNIIA==",
|
||||
"requires": {
|
||||
"dkim-signer": "0.2.2",
|
||||
"mailcomposer": "3.12.0"
|
||||
}
|
||||
},
|
||||
"serve-static": {
|
||||
"version": "1.14.1",
|
||||
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz",
|
||||
|
||||
+3
-1
@@ -17,6 +17,8 @@
|
||||
"bcrypt": "^3.0.8",
|
||||
"cors": "^2.8.5",
|
||||
"express": "^4.17.1",
|
||||
"express-fileupload": "^1.1.6"
|
||||
"express-fileupload": "^1.1.6",
|
||||
"randomstring": "^1.1.5",
|
||||
"sendmail": "^1.6.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
const connection = require('../conf/connection.js');
|
||||
const express = require('express');
|
||||
const bcrypt = require('bcrypt');
|
||||
const sendmail = require('sendmail')();
|
||||
|
||||
|
||||
var app = express()
|
||||
var randomstring = require("randomstring");
|
||||
|
||||
function query(consulta) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
connection.query(`${consulta}`, (error, results, files) => {
|
||||
if (error) reject(error);
|
||||
resolve(results);
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
function depurado(cadena) {
|
||||
if (cadena != null) {
|
||||
cadena = cadena.replace(/'/g, "''");
|
||||
cadena = cadena.replace(/;/g, "m");
|
||||
return cadena;
|
||||
} else
|
||||
return null;
|
||||
}
|
||||
|
||||
app.get('/enviar_email', async(req, res) => {
|
||||
|
||||
let id_persona;
|
||||
try {
|
||||
let n = req.query.correo;
|
||||
console.log(req.query, n);
|
||||
n = depurado(n);
|
||||
let cad = `select id_persona from persona where correo_electronico='${n}'`;
|
||||
let respuesta = await query(cad);
|
||||
console.log(n);
|
||||
console.log(respuesta);
|
||||
if (respuesta.length == 0)
|
||||
return res.status(400).json({ error: false, msj: "El correo aun no se ha registrado" });
|
||||
else
|
||||
id_persona = respuesta[0].id_persona;
|
||||
|
||||
|
||||
|
||||
} catch (err) {
|
||||
console.log("afuera ", err);
|
||||
res.status(400).json({ error: true, msj: "error al verificar el correo" });
|
||||
}
|
||||
try {
|
||||
let nueva = randomstring.generate({
|
||||
length: 10,
|
||||
charset: 'alphabetic'
|
||||
});
|
||||
let n_pasword = await bcrypt.hash(nueva, 10);
|
||||
|
||||
let cad = `update persona set password='${n_pasword}' where id_persona=${id_persona};`;
|
||||
let respuesta = query(cad);
|
||||
respuesta.then(() => {
|
||||
let correo = req.query.correo;
|
||||
sendmail({
|
||||
from: 'prueba_no_sirve@coloquio_eduacion.com',
|
||||
to: `${correo}`,
|
||||
subject: 'Nueva contraseña Coloquio de Educacion FES-Acatlan',
|
||||
html: `La nueva contraseña es: ${nueva}`,
|
||||
}, function(err, reply) {
|
||||
console.log(err && err.stack);
|
||||
console.dir(reply);
|
||||
});
|
||||
|
||||
}).catch(() => {
|
||||
return res.status(400).json({ error: true, msj: "error al actualizar la contraseña" });
|
||||
})
|
||||
res.status(200).json({ error: false, msj: "exito" });
|
||||
|
||||
|
||||
} catch (err) {
|
||||
return res.status(400).json({ error: true, msj: "error al encriptar la contraseña" });
|
||||
}
|
||||
})
|
||||
module.exports = app
|
||||
+2
-1
@@ -5,9 +5,10 @@ app.use(require('./registro'));
|
||||
app.use(require('./registro_ponencia'));
|
||||
app.use(require('./traer_pais'));
|
||||
app.use(require('./loggin_admin'));
|
||||
app.use(require('./loggin_persona'));
|
||||
app.use(require('./llenar_ponencia'));
|
||||
app.use(require('./llenar_cartel'));
|
||||
app.use(require('./descargar_ponencia'));
|
||||
app.use(require('./descargar_cartel'));
|
||||
|
||||
app.use(require('./enviar_email'));
|
||||
module.exports = app;
|
||||
+44
-22
@@ -18,6 +18,7 @@ function depurado(cadena) {
|
||||
if (cadena != null) {
|
||||
cadena = cadena.replace(/'/g, "''");
|
||||
cadena = cadena.replace(/;/g, "m");
|
||||
return cadena;
|
||||
|
||||
} else
|
||||
return null;
|
||||
@@ -29,31 +30,52 @@ app.get('/llenar_cartel', async(req, res) => {
|
||||
let data = req.query;
|
||||
|
||||
console.log(req.query);
|
||||
try {
|
||||
let cad = `select nombre_mesa from admin where id_admin=${data.id_admin};`;
|
||||
let respuesta = await query(cad);
|
||||
mesa = respuesta[0].nombre_mesa;
|
||||
} catch (err) {
|
||||
console.log("afuera ", err);
|
||||
res.status(400).json({ error: true, msj: err, mas: data });
|
||||
return;
|
||||
}
|
||||
try {
|
||||
if (data.id_admin != 10) {
|
||||
try {
|
||||
|
||||
let cad = `select * from trabajo where mesa_tematica='${mesa}' and tipo_trabajo='cartel';`;
|
||||
let respuesta = query(cad);
|
||||
respuesta.then(r => {
|
||||
res.status(200).json({ error: false, msj: "exito", dat: r });
|
||||
let cad = `select nombre_mesa from admin where id_admin=${data.id_admin};`;
|
||||
let respuesta = await query(cad);
|
||||
mesa = respuesta[0].nombre_mesa;
|
||||
} catch (err) {
|
||||
console.log("afuera ", err);
|
||||
res.status(400).json({ error: true, msj: err, mas: data });
|
||||
return;
|
||||
}).catch(err => {
|
||||
res.status(400).json({ error: true, msj: err });
|
||||
return
|
||||
})
|
||||
}
|
||||
try {
|
||||
|
||||
let cad = `select * from trabajo where mesa_tematica='${mesa}' and tipo_trabajo='cartel';`;
|
||||
let respuesta = query(cad);
|
||||
respuesta.then(r => {
|
||||
res.status(200).json({ error: false, msj: "exito", dat: r });
|
||||
return;
|
||||
}).catch(err => {
|
||||
res.status(400).json({ error: true, msj: err });
|
||||
return
|
||||
})
|
||||
|
||||
} catch (err) {
|
||||
console.log("afuera ", err);
|
||||
res.status(400).json({ error: true, msj: err });
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
let cad = `select * from trabajo where tipo_trabajo='cartel';`;
|
||||
let respuesta = query(cad);
|
||||
respuesta.then(r => {
|
||||
res.status(200).json({ error: false, msj: "exito", dat: r });
|
||||
return;
|
||||
}).catch(err => {
|
||||
res.status(400).json({ error: true, msj: err });
|
||||
return
|
||||
})
|
||||
|
||||
} catch (err) {
|
||||
console.log("afuera ", err);
|
||||
res.status(400).json({ error: true, msj: err });
|
||||
return;
|
||||
}
|
||||
|
||||
} catch (err) {
|
||||
console.log("afuera ", err);
|
||||
res.status(400).json({ error: true, msj: err });
|
||||
return;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
+44
-23
@@ -18,6 +18,7 @@ function depurado(cadena) {
|
||||
if (cadena != null) {
|
||||
cadena = cadena.replace(/'/g, "''");
|
||||
cadena = cadena.replace(/;/g, "m");
|
||||
return cadena;
|
||||
|
||||
} else
|
||||
return null;
|
||||
@@ -27,30 +28,50 @@ function depurado(cadena) {
|
||||
app.get('/llenar_ponencia', async(req, res) => {
|
||||
let mesa;
|
||||
let data = req.query;
|
||||
try {
|
||||
let cad = `select nombre_mesa from admin where id_admin=${data.id_admin};`;
|
||||
let respuesta = await query(cad);
|
||||
mesa = respuesta[0].nombre_mesa;
|
||||
} catch (err) {
|
||||
console.log("afuera ", err);
|
||||
res.status(400).json({ error: true, msj: err });
|
||||
return;
|
||||
}
|
||||
try {
|
||||
let cad = `select * from trabajo where mesa_tematica='${mesa}' and tipo_trabajo='ponencia';`;
|
||||
let respuesta = query(cad);
|
||||
respuesta.then(r => {
|
||||
res.status(200).json({ error: false, msj: "exito", dat: r });
|
||||
return;
|
||||
}).catch(err => {
|
||||
res.status(400).json({ error: true, msj: err });
|
||||
return
|
||||
})
|
||||
|
||||
} catch (err) {
|
||||
console.log("afuera ", err);
|
||||
res.status(400).json({ error: true, msj: err });
|
||||
return;
|
||||
if (data.id_admin != 10) {
|
||||
try {
|
||||
let cad = `select nombre_mesa from admin where id_admin=${data.id_admin};`;
|
||||
let respuesta = await query(cad);
|
||||
mesa = respuesta[0].nombre_mesa;
|
||||
} catch (err) {
|
||||
console.log("afuera ", err);
|
||||
res.status(400).json({ error: true, msj: err });
|
||||
return;
|
||||
}
|
||||
try {
|
||||
let cad = `select * from trabajo where mesa_tematica='${mesa}' and tipo_trabajo='ponencia';`;
|
||||
let respuesta = query(cad);
|
||||
respuesta.then(r => {
|
||||
res.status(200).json({ error: false, msj: "exito", dat: r });
|
||||
return;
|
||||
}).catch(err => {
|
||||
res.status(400).json({ error: true, msj: err });
|
||||
return
|
||||
})
|
||||
|
||||
} catch (err) {
|
||||
console.log("afuera ", err);
|
||||
res.status(400).json({ error: true, msj: err });
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
let cad = `select * from trabajo where tipo_trabajo='ponencia';`;
|
||||
let respuesta = query(cad);
|
||||
respuesta.then(r => {
|
||||
res.status(200).json({ error: false, msj: "exito", dat: r });
|
||||
return;
|
||||
}).catch(err => {
|
||||
res.status(400).json({ error: true, msj: err });
|
||||
return
|
||||
})
|
||||
|
||||
} catch (err) {
|
||||
console.log("afuera ", err);
|
||||
res.status(400).json({ error: true, msj: err });
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -18,6 +18,7 @@ function depurado(cadena) {
|
||||
if (cadena != null) {
|
||||
cadena = cadena.replace(/'/g, "''");
|
||||
cadena = cadena.replace(/;/g, "m");
|
||||
return cadena;
|
||||
|
||||
} else
|
||||
return null;
|
||||
|
||||
@@ -18,18 +18,21 @@ function depurado(cadena) {
|
||||
if (cadena != null) {
|
||||
cadena = cadena.replace(/'/g, "''");
|
||||
cadena = cadena.replace(/;/g, "m");
|
||||
return cadena;
|
||||
|
||||
} else
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
app.post('/loggin_admin', async(req, res) => {
|
||||
app.post('/loggin_persona', async(req, res) => {
|
||||
try {
|
||||
let data = req.body;
|
||||
let usuario = depurado(data.correo);
|
||||
//console.log(usuario, " lksaldksjdlasd");
|
||||
let cad = `select * from persona where correo_electronico='${data.usuario}';`;
|
||||
console.log(usuario);
|
||||
let cad = `select * from persona where correo_electronico='${usuario}';`;
|
||||
console.log(cad);
|
||||
let respuesta = query(cad);
|
||||
// console.log(respuesta);
|
||||
respuesta.then(async r => {
|
||||
@@ -52,7 +55,7 @@ app.post('/loggin_admin', async(req, res) => {
|
||||
|
||||
return;
|
||||
} else {
|
||||
res.status(400).json({ error: false, msj: "Usuario o contraseña invalidos" });
|
||||
res.status(400).json({ error: false, msj: "contraseña invalidos" });
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -60,6 +60,7 @@ app.post('/registro', async(req, res) => {
|
||||
if (n_cuenta != null)
|
||||
n_cuenta = "'" + n_cuenta + "'";
|
||||
let n_pasword = await bcrypt.hash(body.password, 10);
|
||||
console.log(n_pasword);
|
||||
cad = `insert into persona values (null,'${n_nombre}', '${n_apellido_p}', '${n_apellido_m}', ${po}, ${as}, '${n_institucion}', '${body.comunidad}',
|
||||
'${body.situacion_academica}', '${body.pais}', ${n_cuenta}, '${n_correo}' ,'${n_pasword}', false );`;
|
||||
respuesta = query(cad);
|
||||
|
||||
@@ -25,9 +25,9 @@ function depurado(cadena) {
|
||||
app.post('/registro_ponencia', async(req, res) => {
|
||||
|
||||
|
||||
let pon = req.body.ponencia;
|
||||
if (req.body.ponencia == undefined || req.body.cartel == undefined)
|
||||
return res.status(400).json({ erro: true, msj: "falta el coampo ponencia o el campo cartel" });
|
||||
|
||||
if (req.body.ponencia == undefined && req.body.cartel == undefined)
|
||||
return res.status(400).json({ erro: true, msj: "falta el campo ponencia o el campo cartel" });
|
||||
console.log(req.body.id_persona);
|
||||
|
||||
try {
|
||||
@@ -88,7 +88,7 @@ app.post('/registro_ponencia', async(req, res) => {
|
||||
|
||||
|
||||
try {
|
||||
if (req.files.cartel) {
|
||||
if (req.files.cartel != undefined) {
|
||||
let sampleFile = req.files.cartel;
|
||||
sampleFile.mv(`files/cartel-${req.body.id_persona}.docx`, function(err) {
|
||||
if (err)
|
||||
@@ -101,10 +101,14 @@ app.post('/registro_ponencia', async(req, res) => {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
let pon = req.body.ponencia;
|
||||
try {
|
||||
if (pon.autor_principal != undefined) {
|
||||
console.log(req.body.ponencia);
|
||||
if (pon != undefined) {
|
||||
pon = JSON.parse(pon);
|
||||
console.log(pon);
|
||||
let n_autor_p = depurado(pon.autor_principal);
|
||||
console.log(pon.autor_principal, " ", n_autor_p);
|
||||
let n_segundo = depurado(pon.segundo_autor);
|
||||
let n_nombre = depurado(pon.nombre_trabajo);
|
||||
let n_mesa = depurado(pon.mesa);
|
||||
@@ -118,13 +122,15 @@ app.post('/registro_ponencia', async(req, res) => {
|
||||
|
||||
} catch (err) {
|
||||
|
||||
res.status(400).json({ error: true, msj: err });
|
||||
res.status(400).json({ error: true, msj: "error al registrar ponencia" });
|
||||
return;
|
||||
}
|
||||
|
||||
let car = req.body.cartel;
|
||||
try {
|
||||
if (car.autor_principal != undefined) {
|
||||
if (car != undefined) {
|
||||
car = JSON.parse(car);
|
||||
console.log(car);
|
||||
let n_autor_p = depurado(car.autor_principal);
|
||||
let n_segundo = depurado(car.segundo_autor);
|
||||
let n_nombre = depurado(car.nombre_trabajo);
|
||||
@@ -138,7 +144,7 @@ app.post('/registro_ponencia', async(req, res) => {
|
||||
|
||||
} catch (err) {
|
||||
|
||||
res.status(400).json({ error: true, msj: err });
|
||||
res.status(400).json({ error: true, msj: "al registrar el cartel" });
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
@@ -217,3 +217,7 @@ insert into admin values(null, 'Mesa_8', '$2b$10$sBQYtnJsqCuNGVH.IKv4zu8x.KazpMG
|
||||
|
||||
--insert into admin values(null, 'Mesa_9', 'ksi8REn91C', 'Educación ambiental y bioética' );
|
||||
insert into admin values(null, 'Mesa_9', '$2b$10$zULlGphKeqXkvqAifLX7r.XlZYDJ4035O2mNKUvLOK9DW7cL9wMA2', 'Educación ambiental y bioética' );
|
||||
|
||||
--insert into admin values(null, 'Administrador', 'CMfcStNPjz', '' );
|
||||
insert into admin values(null, 'Administrador', '$2b$10$YqVknXcVK3g4H.b4X7ecVO9inEvBA0vBKrN1lZyRL1U9p0qwEQGJm', '' );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user