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,18 @@
|
||||
import type { Mailer, OutboundMail } from './types.js';
|
||||
|
||||
/** Development mailbox. The message is accepted locally and printed. It is not delivered to a person. */
|
||||
export function createConsoleMailer(write: (line: string) => void = (line) => console.log(line)): Mailer {
|
||||
return {
|
||||
async send(message: OutboundMail) {
|
||||
const extra = Object.entries(message.headers ?? {}).map(([name, value]) => `${name}: ${value}`);
|
||||
write([
|
||||
'Mail console driver accepted a message.',
|
||||
`To: ${message.to}`,
|
||||
`Subject: ${message.subject}`,
|
||||
...extra,
|
||||
message.text,
|
||||
].join('\n'));
|
||||
return { result: 'sent', providerId: null };
|
||||
},
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user