router.post("/auth", async (req, res) => { const { username, password } = req.body;
const user = await login.findOne({ where: { username: username } });
if (!user) res.json({ error: "User Doesn't Exist" });
bcrypt.compare(password, user.password).then((match) => {
if (!match) res.json({ error: "Wrong Username And Password Combination" });
res.json("YOU LOGGED IN!!!");
});
})
module.exports = router;enter image description here