From 5bcdb592f06bae439d01ffba8b69d53bb0af7b2e Mon Sep 17 00:00:00 2001 From: Kasra Bigdeli Date: Sat, 17 Aug 2024 17:03:50 -0700 Subject: [PATCH] Updated changelog --- CHANGELOG.md | 1 + src/datastore/DataStore.ts | 4 ++-- src/models/AutomatedCleanupConfigs.ts | 2 +- src/routes/user/system/SystemRouter.ts | 10 +++++----- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ff4cc8..52c8f52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## [Next Version - available as `edge`] - Fixed: the app log box is resizable again [issue-2112](https://github.com/caprover/caprover/issues/2112) +- Fixed: showing the missing timezones due to daylight saving time[issue-2110](https://github.com/caprover/caprover/issues/2110) ## [1.12.0] - 2024-08-17 diff --git a/src/datastore/DataStore.ts b/src/datastore/DataStore.ts index 1d2d2d3..0064838 100644 --- a/src/datastore/DataStore.ts +++ b/src/datastore/DataStore.ts @@ -117,7 +117,7 @@ class DataStore { return Promise.resolve().then(function () { return self.data.set( AUTOMATED_CLEANUP, - AutomatedCleanupConfigsCleaner.cleanup(configs) + AutomatedCleanupConfigsCleaner.sanitizeInput(configs) ) }) } @@ -127,7 +127,7 @@ class DataStore { return Promise.resolve().then(function () { return ( self.data.get(AUTOMATED_CLEANUP) || - AutomatedCleanupConfigsCleaner.cleanup({ + AutomatedCleanupConfigsCleaner.sanitizeInput({ mostRecentLimit: 0, cronSchedule: '', timezone: '', diff --git a/src/models/AutomatedCleanupConfigs.ts b/src/models/AutomatedCleanupConfigs.ts index 72d8b8f..5b5d761 100644 --- a/src/models/AutomatedCleanupConfigs.ts +++ b/src/models/AutomatedCleanupConfigs.ts @@ -5,7 +5,7 @@ export interface IAutomatedCleanupConfigs { } export class AutomatedCleanupConfigsCleaner { - static cleanup(instance: IAutomatedCleanupConfigs) { + static sanitizeInput(instance: IAutomatedCleanupConfigs) { return { mostRecentLimit: Number(instance.mostRecentLimit) > 0 diff --git a/src/routes/user/system/SystemRouter.ts b/src/routes/user/system/SystemRouter.ts index 8ab4c27..d405890 100644 --- a/src/routes/user/system/SystemRouter.ts +++ b/src/routes/user/system/SystemRouter.ts @@ -221,13 +221,13 @@ router.get('/diskcleanup/', function (req, res, next) { }) router.post('/diskcleanup/', function (req, res, next) { - const configs = AutomatedCleanupConfigsCleaner.cleanup({ - mostRecentLimit: req.body.mostRecentLimit, - cronSchedule: req.body.cronSchedule, - timezone: req.body.timezone, - }) return Promise.resolve() .then(function () { + const configs = AutomatedCleanupConfigsCleaner.sanitizeInput({ + mostRecentLimit: req.body.mostRecentLimit, + cronSchedule: req.body.cronSchedule, + timezone: req.body.timezone, + }) return CaptainManager.get() .getDiskCleanupManager() .setConfig(configs)