- Update App.tsx to use getAppConfig() instead of import.meta.env - Update email templates to use getAppConfig() for base URL - Update database strategy to use getDatabaseConfig() function - Update mailgun service to use getter functions - Remove direct unified config imports in favor of functions - Ensure consistent configuration access throughout codebase
18 lines
589 B
TypeScript
18 lines
589 B
TypeScript
import { EmailVerificationToken } from '../auth.types';
|
|
import { getAppConfig } from '../../../config/unified.config';
|
|
|
|
export const verificationEmailTemplate = (token: EmailVerificationToken) => {
|
|
const verificationLink = `${getAppConfig().baseUrl}/verify-email?token=${token.token}`;
|
|
|
|
return `
|
|
<html>
|
|
<body>
|
|
<h1>Email Verification</h1>
|
|
<p>Please verify your email address by clicking the link below:</p>
|
|
<p><a href="${verificationLink}">${verificationLink}</a></p>
|
|
<p>This link will expire in 24 hours.</p>
|
|
</body>
|
|
</html>
|
|
`;
|
|
};
|