listo para pruebas

This commit is contained in:
Lemuel Marquez
2021-05-19 02:34:45 -05:00
parent f27f497433
commit 09bfbf7f85
4 changed files with 41 additions and 41 deletions
+2 -1
View File
@@ -17,7 +17,8 @@ const obtenerAlumno = async (numeroCuenta) => {
.query(`CALL busca_alumno_pcpuma('${numeroCuenta}')`)
.then((rows) => {
conn.end();
return { rows, length: rows.length };
if (rows[0].length === 0) return null;
return rows[0][0];
})
.catch((err) => {
conn.end();