2020-07-20 17:32:32 +02:00
|
|
|
import config from "config";
|
2021-05-03 19:29:22 +02:00
|
|
|
|
|
|
|
import MailTemplate from "./mail/MailTemplate.js";
|
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
|
|
|
);
|
2021-02-20 20:18:03 +01:00
|
|
|
|
|
|
|
export const REMOVE_PASSWORD_MAIL_TEMPLATE: MailTemplate = new MailTemplate(
|
|
|
|
'remove_password',
|
|
|
|
() => `Remove password from your ${config.get<string>('app.name')} account.`,
|
|
|
|
);
|