feat: wire welcome email for new member creation
This commit is contained in:
parent
8b7f124f15
commit
a32e4de2ac
2 changed files with 43 additions and 2 deletions
|
|
@ -4,6 +4,7 @@ import { connectDB } from '../../utils/mongoose.js'
|
|||
import { getSlackService } from '../../utils/slack.ts'
|
||||
import { validateBody } from '../../utils/validateBody.js'
|
||||
import { memberCreateSchema } from '../../utils/schemas.js'
|
||||
import { sendWelcomeEmail } from '../../utils/resend.js'
|
||||
// Simple payment check function to avoid import issues
|
||||
const requiresPayment = (contributionValue) => contributionValue !== '0'
|
||||
|
||||
|
|
@ -98,8 +99,13 @@ export default defineEventHandler(async (event) => {
|
|||
// Payment processing will be added here
|
||||
}
|
||||
|
||||
// TODO: Send welcome email
|
||||
|
||||
// Send welcome email (non-blocking)
|
||||
try {
|
||||
await sendWelcomeEmail(member)
|
||||
} catch (emailError) {
|
||||
console.error('Failed to send welcome email:', emailError)
|
||||
}
|
||||
|
||||
return {
|
||||
success: true,
|
||||
member: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue