Skip to content

Commit

Permalink
Merge pull request #203 from konecty/hotfix/email-update
Browse files Browse the repository at this point in the history
fix: email updateOne
  • Loading branch information
7sete7 authored Jan 13, 2025
2 parents d390019 + f0d44e8 commit 42e4ce3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/imports/mailConsumer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ async function sendEmail(record) {
if (!record.to) {
const err = { message: 'No address to send e-mail to.' };
err.host = serverHost || record.server;
await MetaObject.Collections['Message'].update({ _id: record._id }, { $set: { status: 'Falha no Envio', error: err } });
await MetaObject.Collections['Message'].updateOne({ _id: record._id }, { $set: { status: 'Falha no Envio', error: err } });
logger.error(`📧 Email error: ${JSON.stringify(err, null, ' ')}`);
return errorReturn('No address to send e-mail to.');
} else {
Expand Down

0 comments on commit 42e4ce3

Please sign in to comment.