Skip to content

Commit

Permalink
Merge pull request #33 from tanish35/master
Browse files Browse the repository at this point in the history
Minor Change
  • Loading branch information
tanish35 authored Jul 31, 2024
2 parents 350435d + 425ec6d commit 78008be
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
4 changes: 2 additions & 2 deletions backend/dist/controllers/userControllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const registerUser = (0, express_async_handler_1.default)((req, res) => __awaite
const exp = Date.now() + 1000 * 60 * 5;
// @ts-ignore
const token = jsonwebtoken_1.default.sign({ sub: user.user_id, exp }, process.env.SECRET);
const url = `https://localhost:3000/api/user/verify/${token}`;
const url = `https://api-statuscode1.wedevelopers.online/api/user/verify/${token}`;
const htmlContent = `<a href="${url}">Verify using this link</a>`;
// @ts-ignore
yield (0, sendMail_1.default)(email, htmlContent);
Expand All @@ -122,7 +122,7 @@ const registerUser = (0, express_async_handler_1.default)((req, res) => __awaite
const exp = Date.now() + 1000 * 60 * 5;
// @ts-ignore
const token = jsonwebtoken_1.default.sign({ sub: user.user_id, exp }, process.env.SECRET);
const url = `http://localhost:3000/api/user/verify/${token}`;
const url = `https://api-statuscode1.wedevelopers.online/api/user/verify/${token}`;
const htmlContent = `<a href="${url}">Verify using this link</a>`;
// @ts-ignore
yield (0, sendMail_1.default)(email, htmlContent);
Expand Down
5 changes: 4 additions & 1 deletion backend/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ const ratingRoute_1 = __importDefault(require("./routes/ratingRoute"));
const app = (0, express_1.default)();
app.use(express_1.default.json());
const corsOptions = {
origin: "http://localhost:3001",
origin: [
"http://localhost:3001",
"https://app-statuscode1.wedevelopers.online",
],
credentials: true,
};
app.use((0, cors_1.default)(corsOptions));
Expand Down
4 changes: 2 additions & 2 deletions backend/src/controllers/userControllers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const registerUser = asyncHandler(async (req: Request, res: Response) => {
const exp = Date.now() + 1000 * 60 * 5;
// @ts-ignore
const token = jwt.sign({ sub: user.user_id, exp }, process.env.SECRET);
const url = `https://localhost:3000/api/user/verify/${token}`;
const url = `https://api-statuscode1.wedevelopers.online/api/user/verify/${token}`;
const htmlContent = `<a href="${url}">Verify using this link</a>`;
// @ts-ignore
await sendMail(email, htmlContent);
Expand All @@ -110,7 +110,7 @@ const registerUser = asyncHandler(async (req: Request, res: Response) => {
const exp = Date.now() + 1000 * 60 * 5;
// @ts-ignore
const token = jwt.sign({ sub: user.user_id, exp }, process.env.SECRET);
const url = `http://localhost:3000/api/user/verify/${token}`;
const url = `https://api-statuscode1.wedevelopers.online/api/user/verify/${token}`;
const htmlContent = `<a href="${url}">Verify using this link</a>`;
// @ts-ignore
await sendMail(email, htmlContent);
Expand Down
5 changes: 4 additions & 1 deletion backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ import ratingRoutes from "./routes/ratingRoute";
const app = express();
app.use(express.json());
const corsOptions = {
origin: "http://localhost:3001",
origin: [
"http://localhost:3001",
"https://app-statuscode1.wedevelopers.online",
],
credentials: true,
};
app.use(cors(corsOptions));
Expand Down

0 comments on commit 78008be

Please sign in to comment.