Commit c08bfb4f authored by Ivan Tancara's avatar Ivan Tancara
Browse files

await en login

parent eb78e092
......@@ -74,7 +74,7 @@ app.post('/login', async function (req, res) {
for (const usuarioConfig of config.usuarios) {
if (usuarioConfig.usuario === usuario && usuarioConfig.password === password ) {
existe = true;
respuesta.token = jwt.sign({ usuario }, config.SECRET_TOKEN, { expiresIn: 60 * 60 });
respuesta.token = await jwt.sign({ usuario }, config.SECRET_TOKEN, { expiresIn: 60 * 60 });
}
}
if (!existe) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment