2020-07-20 17:32:32 +02:00
|
|
|
import config from "config";
|
2020-11-14 17:24:42 +01:00
|
|
|
import {MailTemplate} from "./mail/Mail";
|
2020-07-20 17:32:32 +02:00
|
|
|
|
|
|
|
export const MAGIC_LINK_MAIL = new MailTemplate(
|
|
|
|
'magic_link',
|
2021-01-21 15:58:03 +01:00
|
|
|
data => data.type === 'register' ?
|
|
|
|
'Registration' :
|
|
|
|
'Login magic link',
|
2020-07-20 17:32:32 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
export const ACCOUNT_REVIEW_NOTICE_MAIL_TEMPLATE: MailTemplate = new MailTemplate(
|
|
|
|
'account_review_notice',
|
2020-09-25 23:42:15 +02:00
|
|
|
data => `Your account was ${data.approved ? 'approved' : 'rejected'}.`,
|
2020-07-20 17:32:32 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
export const PENDING_ACCOUNT_REVIEW_MAIL_TEMPLATE: MailTemplate = new MailTemplate(
|
|
|
|
'pending_account_review',
|
2021-01-21 15:58:03 +01:00
|
|
|
() => `A new account is pending review on ${config.get<string>('app.name')}`,
|
|
|
|
);
|
|
|
|
|
|
|
|
export const ADD_EMAIL_MAIL_TEMPLATE: MailTemplate = new MailTemplate(
|
|
|
|
'add_email',
|
|
|
|
(data) => `Add ${data.email} address to your ${config.get<string>('app.name')} account.`,
|
2020-07-20 17:32:32 +02:00
|
|
|
);
|