Skip to content

Commit

Permalink
rename field to bodyTemplateFile
Browse files Browse the repository at this point in the history
  • Loading branch information
despadam committed Sep 9, 2024
1 parent 90c495e commit 3a75dde
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/jobs/actions/emailaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ export class EmailJobAction<T> implements JobAction<T> {
if (!data["subject"]) {
throw new NotFoundException("Param 'subject' is undefined");
}
if (!data["bodyTemplate"]) {
throw new NotFoundException("Param 'bodyTemplate' is undefined");
if (!data["bodyTemplateFile"]) {
throw new NotFoundException("Param 'bodyTemplateFile' is undefined");
}
Logger.log("EmailJobAction parameters are valid.", "EmailJobAction");

Expand All @@ -101,7 +101,7 @@ export class EmailJobAction<T> implements JobAction<T> {
this.toTemplate = compile(data["to"]);
this.subjectTemplate = compile(data["subject"]);

const templateFile = readFileSync(data["bodyTemplate"] as string, "utf8");
const templateFile = readFileSync(data["bodyTemplateFile"] as string, "utf8");

Check failure on line 104 in src/jobs/actions/emailaction.ts

View workflow job for this annotation

GitHub Actions / eslint

Replace `data["bodyTemplateFile"]·as·string,·"utf8"` with `⏎······data["bodyTemplateFile"]·as·string,⏎······"utf8",⏎····`
this.bodyTemplate = compile(templateFile);
}

Expand Down
2 changes: 1 addition & 1 deletion src/jobs/config/jobConfig.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"to": "{{contactEmail}}",
"from": "from",
"subject": "[SciCat] Your {{type}} job was submitted successfully",
"bodyTemplate": "src/common/email-templates/job-template-simplified.html"
"bodyTemplateFile": "src/common/email-templates/job-template-simplified.html"
}
]
},
Expand Down

0 comments on commit 3a75dde

Please sign in to comment.