-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/TEDx-SJEC/website into feat…
…/santhsim
- Loading branch information
Showing
4 changed files
with
19 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
"use server" | ||
"use server"; | ||
|
||
import prisma from "@/server/db" | ||
import prisma from "@/server/db"; | ||
|
||
export async function invalidateCouponCode(couponCode:string){ | ||
export async function invalidateCouponCode(couponCode: string) { | ||
if (!couponCode) return; | ||
const resp = await prisma.referral.update({ | ||
where:{ | ||
code:couponCode | ||
where: { | ||
code: couponCode, | ||
}, | ||
data:{ | ||
isUsed:true | ||
} | ||
}) | ||
} | ||
data: { | ||
isUsed: true, | ||
}, | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,6 +78,12 @@ export function Payment() { | |
alert("Payment failed"); | ||
} | ||
}, | ||
// change to dynamic | ||
notes: { | ||
customerName: "John Doe", | ||
customerEmail: "[email protected]", | ||
customerContact: "9999999999", | ||
}, | ||
prefill: { | ||
name: "John Doe", | ||
email: "[email protected]", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,9 +17,8 @@ export async function sendRegistrationEmail({ | |
await resend.emails.send({ | ||
from: '"Tedx SJEC" <[email protected]>', | ||
to: email, | ||
subject: "Tedx SJEC - Email Verification", | ||
subject: "Event Registration Successful - TEDx SJEC", | ||
react: TedxRegistrationEmail({ name, registrationLink }), | ||
text: `Hello ${name},\n\nThank you for registering for Tedx 2024.\n\nPlease click on the link below to complete your registration.\n\n${registrationLink}\n\nThank you!\n\nTedx SJEC Team`, | ||
}); | ||
} catch (error) { | ||
console.log(error); | ||
|