Skip to content

Commit ebf457f

Browse files
author
CI Fix
committed
updates to lib/srvices
1 parent 635f7b2 commit ebf457f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/services/blacklist-service.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import blacklistConfig from '../../config/usernames-blacklist.json' assert { type: 'json' };
1+
import blacklistConfig from '../../config/usernames-blacklist.json' with { type: 'json' };
22
import bigUsernameBlacklistPkg from 'the-big-username-blacklist';
33
const { list: bigBlacklist } = bigUsernameBlacklistPkg;
44

lib/services/email-service.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import fs from 'fs';
12
import nodemailer from 'nodemailer';
23
import path from 'path';
34
import 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
}

0 commit comments

Comments
 (0)