Skip to content

Commit

Permalink
style: 🎨 format code with Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Sep 30, 2023
1 parent b67e0c3 commit a1d1c8b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
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 @@ -99,7 +99,7 @@ function sendErrorEmails(
customerEmail,
customerName,
error,
retries = 5
retries = 5,
) {
// Email configuration
const transporter = nodemailer.createTransport({
Expand Down Expand Up @@ -156,21 +156,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
4 changes: 2 additions & 2 deletions website/handlePurchase.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const webhookVerifyMiddleware = (request, response, next) => {
stripe.webhooks.constructEvent(
request.rawBody,
sigHeader,
webhookSecret
webhookSecret,
);
next();
} catch (error) {
Expand Down Expand Up @@ -46,7 +46,7 @@ const handleCheckoutSession = (req, res) => {
fileSharing.handlePhotos(
purchasedItems,
customerEmail,
customerName
customerName,
);
} catch (error) {
// fileSharing.sendErrorEmails(
Expand Down

0 comments on commit a1d1c8b

Please sign in to comment.