Files
classroomio/packages/email/src/emails/invite-teacher.ts
T
Rotimi Best 4b52906445 feat: enhance API route naming conventions and structure
- Added comprehensive guidelines for API route naming and structure in `ROUTE_NAMING_BEST_PRACTICES.md`.
- Updated `ARCHITECHTURE.md` to reference the new best practices document.
- Refactored course-related routes to follow new naming conventions, including changes to endpoint paths and validation schemas.
- Removed the deprecated course clone route and integrated cloning functionality directly into the course routes.
- Adjusted various API methods to ensure consistent usage of HTTP methods and parameter structures across the application.
2025-12-05 17:24:16 +01:00

27 lines
698 B
TypeScript

import * as z from 'zod';
import { defineEmail } from '../send';
import { getDefaultTemplate } from '../templates';
export const inviteTeacherEmail = defineEmail({
id: 'inviteTeacher',
subject: 'Join us on ClassroomIO 😃',
schema: z.object({
email: z.string().email(),
orgName: z.string().min(1),
orgSiteName: z.string().min(1),
inviteLink: z.url()
}),
render: (fields) => {
const content = `
<p>Hey there,</p>
<p>You have been invited to join ${fields.orgName} on ClassroomIO 🎉🎉🎉.</p>
<div>
<a class="button" href="${fields.inviteLink}">Accept Invitation</a>
</div>
`;
return getDefaultTemplate(content);
}
});