File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 1- import blacklistConfig from '../../config/usernames-blacklist.json' assert { type : 'json ' } ;
1+ import blacklistConfig from '../../config/usernames-blacklist.json' with { type : 'json' } ;
22import bigUsernameBlacklistPkg from 'the-big-username-blacklist' ;
33const { list : bigBlacklist } = bigUsernameBlacklistPkg ;
44
Original file line number Diff line number Diff line change 1+ import fs from 'fs' ;
12import nodemailer from 'nodemailer' ;
23import path from 'path' ;
34import debugModule from '../debug.mjs' ;
@@ -39,9 +40,9 @@ class EmailService {
3940 const templateFile = this . templatePathFor ( templateName ) ;
4041 let template ;
4142 try {
42- template = require ( templateFile ) ;
43+ template = fs . readFileSync ( templateFile , 'utf-8' ) ;
4344 } catch ( error ) {
44- throw new Error ( 'Cannot find email template: ' + templateFile ) ;
45+ throw new Error ( 'Cannot find email template: ' + templateFile )
4546 }
4647 return template ;
4748 }
You can’t perform that action at this time.
0 commit comments