Skip to content

Commit

Permalink
base url test for email verify
Browse files Browse the repository at this point in the history
  • Loading branch information
singharaj-usai committed Oct 7, 2024
1 parent 0bd3a1d commit daefcf5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/functions/api/routes/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ const validateUser = [


// REgister account
router.post("/register-create", async (req, res) => {
router.post("/register-create", validateUser, async (req, res) => {
try {
const { username, email, password } = req.body;
console.log("Registration attempt for:", email);
Expand Down Expand Up @@ -165,7 +165,7 @@ router.post("/register-create", async (req, res) => {
await user.save();

// send email verification link
const verificationLink = `http://localhost:3000/auth/verify/${verificationToken}`;
const verificationLink = `${process.env.BASE_URL}/api/auth/verify-email/${verificationToken}`;

await transporter.sendMail({
from: process.env.EMAIL_USER,
Expand Down

0 comments on commit daefcf5

Please sign in to comment.