From 3ed30dc4b23542b965c50ef093d0b04c89a36101 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Sat, 26 Oct 2024 15:42:12 +0800 Subject: [PATCH] Minor --- server/jobs/clear-old-data.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/jobs/clear-old-data.js b/server/jobs/clear-old-data.js index df5a943a..cfd65a8a 100644 --- a/server/jobs/clear-old-data.js +++ b/server/jobs/clear-old-data.js @@ -1,6 +1,5 @@ const { R } = require("redbean-node"); const { log } = require("../../src/util"); -const { setSetting } = require("../util-server"); const Database = require("../database"); const { Settings } = require("../settings"); const dayjs = require("dayjs"); @@ -27,7 +26,7 @@ const clearOldData = async () => { parsedPeriod = parseInt(period); } catch (_) { log.warn("clearOldData", "Failed to parse setting, resetting to default.."); - await setSetting("keepDataPeriodDays", DEFAULT_KEEP_PERIOD, "general"); + await Settings.set("keepDataPeriodDays", DEFAULT_KEEP_PERIOD, "general"); parsedPeriod = DEFAULT_KEEP_PERIOD; }