Skip to content

Commit b4c1655

Browse files
array to object
1 parent fe7622c commit b4c1655

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/services/emailTemplate.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ const replaceFields = (placeholders, template) => {
1818
const send = async (type, users, templateId, organisationId) => {
1919
let template;
2020
if (templateId) {
21-
template = await db.first(sql.emailTemplates.getById, [
21+
template = await db.first(sql.emailTemplates.getById, {
2222
templateId,
2323
type,
2424
organisationId
25-
]);
25+
});
2626
}
2727
else {
28-
template = await db.first(sql.emailTemplates.getDefault, [
28+
template = await db.first(sql.emailTemplates.getDefault, {
2929
type,
3030
organisationId
31-
]);
31+
});
3232
}
3333
const promises = [];
3434
for (const user of users) {

0 commit comments

Comments
 (0)