Skip to content

Commit c145bde

Browse files
committed
Addressing eslint errors
1 parent 1d67f1a commit c145bde

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

api/server/utils/__tests__/tempChatRetention.test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ describe('tempChatRetention', () => {
9393
it('should create expiration date with default retention period', () => {
9494
const now = new Date();
9595
const result = createTempChatExpirationDate();
96-
96+
9797
const expectedDate = new Date();
9898
expectedDate.setDate(expectedDate.getDate() + DEFAULT_RETENTION_DAYS);
99-
99+
100100
// Allow for small time differences in test execution
101101
const timeDiff = Math.abs(result.getTime() - expectedDate.getTime());
102102
expect(timeDiff).toBeLessThan(1000); // Less than 1 second difference
@@ -108,13 +108,13 @@ describe('tempChatRetention', () => {
108108
temporaryChatRetentionDays: 7,
109109
},
110110
};
111-
111+
112112
const now = new Date();
113113
const result = createTempChatExpirationDate(config);
114-
114+
115115
const expectedDate = new Date();
116116
expectedDate.setDate(expectedDate.getDate() + 7);
117-
117+
118118
// Allow for small time differences in test execution
119119
const timeDiff = Math.abs(result.getTime() - expectedDate.getTime());
120120
expect(timeDiff).toBeLessThan(1000); // Less than 1 second difference
@@ -131,4 +131,4 @@ describe('tempChatRetention', () => {
131131
expect(result.getTime()).toBeGreaterThan(now.getTime());
132132
});
133133
});
134-
});
134+
});

api/server/utils/tempChatRetention.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function getTempChatRetentionDays(config) {
3030
retentionDays = envValue;
3131
} else {
3232
logger.warn(
33-
`Invalid TEMP_CHAT_RETENTION_DAYS environment variable: ${process.env.TEMP_CHAT_RETENTION_DAYS}. Using default: ${DEFAULT_RETENTION_DAYS} days.`
33+
`Invalid TEMP_CHAT_RETENTION_DAYS environment variable: ${process.env.TEMP_CHAT_RETENTION_DAYS}. Using default: ${DEFAULT_RETENTION_DAYS} days.`,
3434
);
3535
}
3636
}
@@ -42,20 +42,20 @@ function getTempChatRetentionDays(config) {
4242
retentionDays = configValue;
4343
} else {
4444
logger.warn(
45-
`Invalid temporaryChatRetentionDays in config: ${configValue}. Using ${retentionDays} days.`
45+
`Invalid temporaryChatRetentionDays in config: ${configValue}. Using ${retentionDays} days.`,
4646
);
4747
}
4848
}
4949

5050
// Validate the retention period
5151
if (retentionDays < MIN_RETENTION_DAYS) {
5252
logger.warn(
53-
`Temporary chat retention period ${retentionDays} is below minimum ${MIN_RETENTION_DAYS} days. Using minimum value.`
53+
`Temporary chat retention period ${retentionDays} is below minimum ${MIN_RETENTION_DAYS} days. Using minimum value.`,
5454
);
5555
retentionDays = MIN_RETENTION_DAYS;
5656
} else if (retentionDays > MAX_RETENTION_DAYS) {
5757
logger.warn(
58-
`Temporary chat retention period ${retentionDays} exceeds maximum ${MAX_RETENTION_DAYS} days. Using maximum value.`
58+
`Temporary chat retention period ${retentionDays} exceeds maximum ${MAX_RETENTION_DAYS} days. Using maximum value.`,
5959
);
6060
retentionDays = MAX_RETENTION_DAYS;
6161
}
@@ -81,4 +81,4 @@ module.exports = {
8181
MAX_RETENTION_DAYS,
8282
getTempChatRetentionDays,
8383
createTempChatExpirationDate,
84-
};
84+
};

0 commit comments

Comments
 (0)