Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
francisli committed Aug 25, 2024
1 parent d073104 commit 5188820
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions server/helpers/email/mailer.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,16 @@ if (process.env.AWS_SES_REGION) {
const message = 'SendRawEmail';
const version = 4;
let signature;
signature = crypto.createHmac('sha256', `AWS4${process.env.AWS_SES_SECRET_ACCESS_KEY}`, { encoding: 'utf8' }).update(date).digest();
signature = crypto.createHmac('sha256', signature).update(process.env.AWS_SES_REGION).digest();
signature = crypto
.createHmac('sha256', `AWS4${process.env.AWS_SES_SECRET_ACCESS_KEY}`, {
encoding: 'utf8',
})
.update(date)
.digest();
signature = crypto
.createHmac('sha256', signature)
.update(process.env.AWS_SES_REGION)
.digest();
signature = crypto.createHmac('sha256', signature).update(service).digest();
signature = crypto.createHmac('sha256', signature).update(terminal).digest();
signature = crypto.createHmac('sha256', signature).update(message).digest();
Expand Down

0 comments on commit 5188820

Please sign in to comment.