Skip to content

Commit

Permalink
Merge pull request #76 from TEDx-SJEC/fixes
Browse files Browse the repository at this point in the history
fixed site url
  • Loading branch information
joywin2003 authored Nov 23, 2024
2 parents ccd8100 + 6b82832 commit 6669528
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/app/admin/verify/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import React from "react";
async function getPaymentData(id: string) {
// Simulate API call
//Hardcoded the url because the other one just did'nt work
const response = await fetch(`http://localhost:3000/api/verify-order/${id}`);
const response = await fetch(`${process.env.NEXT_PUBLIC_SITE_URL}/api/verify-order/${id}`);
const data = await response.json();
if (response.status === 200) {
return data;
Expand Down
6 changes: 3 additions & 3 deletions src/app/api/send-email/[paymentId]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ export async function POST(
});
try {
await sendRegistrationEmail({
email: payment.email,
name: user?.name!,
registrationLink: `http://localhost:3000/admin/verify/${payment.id}`,
email: payment.email,
name: user?.name!,
registrationLink: `${process.env.NEXT_PUBLIC_SITE_URL}/admin/verify/${payment.id}`,
});
} catch (error) {
console.log(error);
Expand Down
6 changes: 3 additions & 3 deletions src/app/api/verify-order/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ export async function POST(request: NextRequest) {

try {
await sendRegistrationEmail({
email: session.user?.email!,
name: session.user?.name!,
registrationLink: `http://localhost:3000/admin/verify/${razorpayPaymentId}`,
email: session.user?.email!,
name: session.user?.name!,
registrationLink: `${process.env.NEXT_PUBLIC_SITE_URL}/admin/verify/${razorpayPaymentId}`,
});
} catch (error) {
console.log(error);
Expand Down

0 comments on commit 6669528

Please sign in to comment.