diff options
| -rw-r--r-- | server.js | 4 | ||||
| -rw-r--r-- | src/index.html | 2 |
2 files changed, 3 insertions, 3 deletions
@@ -59,11 +59,11 @@ app.post("/api/password/signin", async (req, res) => { } const [users] = await con.query( - "SELECT * FROM users WHERE email = ?",g + "SELECT * FROM users WHERE email = ?", [email] ); - if (users.length == 0) { + if (users == null) { return res.status(200).send("User does not exist"); } const passwordMatch = bcrypt.compareSync(password, users.password); diff --git a/src/index.html b/src/index.html index 68adda0..d440c16 100644 --- a/src/index.html +++ b/src/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Authentication</title> - <link rel="stylesheet" href="./output.css"> + <link rel="stylesheet" href="output.css"> <script src="https://unpkg.com/htmx.org@1.9.12"></script> </head> <body class="bg-gray-100"> |
