mirror of
https://github.com/Expand-sys/ccashfrontend
synced 2025-12-18 15:42:14 +11:00
commiting changes before work
This commit is contained in:
parent
b2ffae680c
commit
0632ce5d30
2 changed files with 2 additions and 1 deletions
|
|
@ -3,7 +3,7 @@ const got = require("got");
|
||||||
async function postUser(name, password) {
|
async function postUser(name, password) {
|
||||||
console.log(process.env.BANKAPIURL);
|
console.log(process.env.BANKAPIURL);
|
||||||
try {
|
try {
|
||||||
const { body } = await got.get(
|
const { body } = await got.post(
|
||||||
process.env.BANKAPIURL + "BankF/user/" + name,
|
process.env.BANKAPIURL + "BankF/user/" + name,
|
||||||
{
|
{
|
||||||
headers: {
|
headers: {
|
||||||
|
|
|
||||||
1
index.js
1
index.js
|
|
@ -380,6 +380,7 @@ app.post("/login", async function (req, res) {
|
||||||
req.session.password = password;
|
req.session.password = password;
|
||||||
res.redirect("/BankF");
|
res.redirect("/BankF");
|
||||||
} else if (verified.body.value == -1) {
|
} else if (verified.body.value == -1) {
|
||||||
|
req.session.errors = [];
|
||||||
req.session.errors.push({ msg: "User not found" });
|
req.session.errors.push({ msg: "User not found" });
|
||||||
res.redirect("/login");
|
res.redirect("/login");
|
||||||
} else if (verified.body.value == 0) {
|
} else if (verified.body.value == 0) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue