🪵 Notifications necessary log (#267)

This commit is contained in:
Montassar Ghanmy
2023-11-21 12:00:32 +01:00
committed by GitHub
parent 44e51d48ad
commit 3bc4aa1d05
2 changed files with 3 additions and 0 deletions
@@ -116,7 +116,9 @@ export default class EmailPusherClass
{ subject, html: html_body, text: text_body }: EmailPusherPayload,
): Promise<void> {
try {
this.logger.info("sending email");
if (!html_body || !text_body || !subject || !to) {
this.logger.error("invalid email");
throw Error("invalid email");
}
@@ -32,6 +32,7 @@ export class DocumentsEngine implements Initializable {
],
},
);
logger.info(`Sending email notification to ${receiver.email_canonical}`);
await globalResolver.platformServices.emailPusher.send(receiver.email_canonical, {
subject,
html,