text changes and remove infra folder
This commit is contained in:
@@ -14,7 +14,7 @@ let schedulerClient = null;
|
||||
function getSchedulerClient() {
|
||||
if (!schedulerClient) {
|
||||
schedulerClient = new SchedulerClient({
|
||||
region: process.env.AWS_REGION || "us-east-1",
|
||||
region: process.env.AWS_REGION,
|
||||
});
|
||||
}
|
||||
return schedulerClient;
|
||||
@@ -34,7 +34,7 @@ async function deleteSchedule(scheduleName) {
|
||||
new DeleteScheduleCommand({
|
||||
Name: scheduleName,
|
||||
GroupName: groupName,
|
||||
})
|
||||
}),
|
||||
);
|
||||
|
||||
logger.info("Deleted schedule after execution", {
|
||||
@@ -74,7 +74,9 @@ function getEmailContent(checkType, rental) {
|
||||
title: "Rental Start Condition Check",
|
||||
message: `Please take photos when you receive "${itemName}" to document its condition. This protects you in case of any disputes.`,
|
||||
deadline: email.formatEmailDate(
|
||||
new Date(new Date(rental.startDateTime).getTime() + 24 * 60 * 60 * 1000)
|
||||
new Date(
|
||||
new Date(rental.startDateTime).getTime() + 24 * 60 * 60 * 1000,
|
||||
),
|
||||
),
|
||||
},
|
||||
rental_end_renter: {
|
||||
@@ -90,7 +92,7 @@ function getEmailContent(checkType, rental) {
|
||||
title: "Post-Rental Condition Check",
|
||||
message: `Please take photos and mark the return status for "${itemName}". This completes the rental process.`,
|
||||
deadline: email.formatEmailDate(
|
||||
new Date(new Date(rental.endDateTime).getTime() + 48 * 60 * 60 * 1000)
|
||||
new Date(new Date(rental.endDateTime).getTime() + 48 * 60 * 60 * 1000),
|
||||
),
|
||||
},
|
||||
};
|
||||
@@ -162,7 +164,7 @@ async function processReminder(rentalId, checkType, scheduleName) {
|
||||
const templatePath = path.join(
|
||||
__dirname,
|
||||
"templates",
|
||||
"conditionCheckReminderToUser.html"
|
||||
"conditionCheckReminderToUser.html",
|
||||
);
|
||||
const template = await email.loadTemplate(templatePath);
|
||||
|
||||
@@ -178,7 +180,7 @@ async function processReminder(rentalId, checkType, scheduleName) {
|
||||
const result = await email.sendEmail(
|
||||
emailContent.recipient.email,
|
||||
emailContent.subject,
|
||||
htmlBody
|
||||
htmlBody,
|
||||
);
|
||||
|
||||
if (!result.success) {
|
||||
|
||||
Reference in New Issue
Block a user