22 lines
563 B
TypeScript
22 lines
563 B
TypeScript
import { NextResponse } from "next/server";
|
|
import { sendEmail } from "~/lib/services/mailer.service";
|
|
|
|
export const GET = async () => {
|
|
const { renderInviteEmail } = await import('@kit/email-templates');
|
|
|
|
const html = await renderInviteEmail({
|
|
language: 'en',
|
|
teamName: 'Test Team',
|
|
invitedUserEmail: 'test@example.com',
|
|
productName: 'Test Product',
|
|
teamLogo: 'https://placehold.co/100x100',
|
|
inviter: 'John Doe',
|
|
link: 'https://www.google.com',
|
|
});
|
|
|
|
return NextResponse.json({
|
|
html,
|
|
length: html.html.length,
|
|
});
|
|
};
|