개발/Node.js2024. 11. 8. 11:34Login / Bcrypt Compare

1. Login// userController.jsexport const postJoin = async (req, res) => { const { email, username, password1, password2, name, location } = req.body; if (password1 !== password2) { return res.status(400).render("join", { pageTitle: "Join", errorMessage: "Password confirmation does not match.", }); } const exists = await User.exists({ $or: [{ username }, { email }] }); if (ex..

image