- Migrated from Python pre-commit to NodeJS-native solution - Reorganized documentation structure - Set up Husky + lint-staged for efficient pre-commit hooks - Fixed Dockerfile healthcheck issue - Added comprehensive documentation index
27 lines
981 B
TypeScript
27 lines
981 B
TypeScript
/**
|
|
* Mock email service for sending verification emails
|
|
*/
|
|
export class EmailService {
|
|
/**
|
|
* Simulates sending a verification email with a link to /verify-email?token=${token}
|
|
* @param email - The recipient's email address
|
|
* @param token - The verification token
|
|
*/
|
|
async sendVerificationEmail(email: string, token: string): Promise<void> {
|
|
// In a real implementation, this would send an actual email
|
|
// For this demo, we'll just log the action
|
|
console.log(
|
|
`📧 Sending verification email to ${email} with token: ${token}`
|
|
);
|
|
console.log(`🔗 Verification link: /verify-email?token=${token}`);
|
|
|
|
// Simulate network delay
|
|
await new Promise(resolve => setTimeout(resolve, 500));
|
|
|
|
// In a real implementation, we would make an HTTP request to an email service
|
|
// Example: await fetch('/api/send-email', { method: 'POST', body: JSON.stringify({ email, token }) });
|
|
}
|
|
}
|
|
|
|
export const emailService = new EmailService();
|