feat: add volunteer shift signup app
Initial source, tests, migrations, and local Docker setup for the Hope Food Pantry volunteer scheduler.
This commit is contained in:
commit
f1a46e2ba7
129 files changed
+25290
No files matched your search
@@ -0,0 +1,19 @@
|
||||
import type { AppConfig } from '../config.js';
|
||||
import { createConsoleMailer } from './console.js';
|
||||
import { createPostmarkMailer } from './postmark.js';
|
||||
import { createSesMailer } from './ses.js';
|
||||
import type { Mailer } from './types.js';
|
||||
|
||||
export function createMailer(config: AppConfig): Mailer {
|
||||
if (config.mail.driver === 'console') return createConsoleMailer();
|
||||
if (config.mail.driver === 'postmark') {
|
||||
if (!config.mail.postmarkToken) throw new Error('POSTMARK_TOKEN is required for the postmark mail driver.');
|
||||
return createPostmarkMailer(config.mail.postmarkToken);
|
||||
}
|
||||
if (!config.mail.ses) throw new Error('SES credentials are required for the ses mail driver.');
|
||||
return createSesMailer({
|
||||
region: config.mail.ses.region,
|
||||
accessKeyId: config.mail.ses.accessKeyId,
|
||||
secretAccessKey: config.mail.ses.secretAccessKey,
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user