chore: Email + mailer refactor (#3342)
* Huge email refactor * fix: One rename too many * comments
This commit is contained in:
16
server/emails/templates/index.ts
Normal file
16
server/emails/templates/index.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { requireDirectory } from "@server/utils/fs";
|
||||
|
||||
const emails = {};
|
||||
|
||||
requireDirectory(__dirname).forEach(([module, id]) => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'default' does not exist on type 'unknown'
|
||||
const { default: Email } = module;
|
||||
|
||||
if (id === "index") {
|
||||
return;
|
||||
}
|
||||
|
||||
emails[id] = Email;
|
||||
});
|
||||
|
||||
export default emails;
|
||||
Reference in New Issue
Block a user