From 0632ce5d3013197f52c2a2ffa69b5bd940da7817 Mon Sep 17 00:00:00 2001 From: Expand-sys Date: Fri, 11 Jun 2021 07:30:24 +1000 Subject: [PATCH] commiting changes before work --- helpers/functions.js | 2 +- index.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/helpers/functions.js b/helpers/functions.js index 106228d..d72ed7e 100644 --- a/helpers/functions.js +++ b/helpers/functions.js @@ -3,7 +3,7 @@ const got = require("got"); async function postUser(name, password) { console.log(process.env.BANKAPIURL); try { - const { body } = await got.get( + const { body } = await got.post( process.env.BANKAPIURL + "BankF/user/" + name, { headers: { diff --git a/index.js b/index.js index 70a73d5..b2abfb6 100644 --- a/index.js +++ b/index.js @@ -380,6 +380,7 @@ app.post("/login", async function (req, res) { req.session.password = password; res.redirect("/BankF"); } else if (verified.body.value == -1) { + req.session.errors = []; req.session.errors.push({ msg: "User not found" }); res.redirect("/login"); } else if (verified.body.value == 0) {