Skip to content

Commit

Permalink
Merge branch 'main' of github.com:michaelbrusegard/NiclasNordlundPhot…
Browse files Browse the repository at this point in the history
…ography

* 'main' of github.com:michaelbrusegard/NiclasNordlundPhotography:
  style: 🎨 format code with Prettier
  build(deps): bump sharp in /functions/compressPublicPhotos
  build(deps): bump axios from 1.4.0 to 1.5.0 in /website
  • Loading branch information
michaelbrusegard committed Sep 30, 2023
2 parents 2ee11da + e21d41a commit 7447759
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
14 changes: 7 additions & 7 deletions functions/compressPublicPhotos/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion functions/compressPublicPhotos/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"license": "Apache-2.0",
"dependencies": {
"@google-cloud/storage": "^7.1.0",
"sharp": "^0.32.5"
"sharp": "^0.32.6"
}
}
12 changes: 6 additions & 6 deletions website/fileSharing.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async function getArchivedPhotosUrl(purchasedItems) {
headers: {
Authorization: `Bearer ${idToken}`,
},
}
},
);
return response.data.url;
}
Expand All @@ -37,7 +37,7 @@ async function sendEmail(
photosUrl,
customerEmail,
customerName,
purchasedItems
purchasedItems,
) {
const transporter = nodemailer.createTransport({
service: "gmail",
Expand Down Expand Up @@ -101,7 +101,7 @@ function sendErrorEmails(
customerEmail,
customerName,
error,
retries = 5
retries = 5,
) {
// Email configuration
const transporter = nodemailer.createTransport({
Expand Down Expand Up @@ -155,21 +155,21 @@ function sendErrorEmails(
if (err) {
console.error(
`Error sending error email (attempt ${attempts}):`,
err
err,
);
if (attempts < retries) {
setTimeout(() => {
sendEmailWithRetry(attempts + 1);
}, 20000);
} else {
console.error(
"Max retry attempts reached. Email not sent."
"Max retry attempts reached. Email not sent.",
);
}
} else {
console.log("Error emails sent:", info.response);
}
}
},
);
}

Expand Down
8 changes: 4 additions & 4 deletions website/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"dependencies": {
"@google-cloud/storage": "^7.1.0",
"axios": "^1.4.0",
"axios": "^1.5.0",
"body-parser": "^1.20.2",
"dotenv": "^16.3.1",
"express": "^4.18.2",
Expand Down

0 comments on commit 7447759

Please sign in to comment.