From f075e15ab78290a749e08d106743bd03eac382b6 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Mon, 16 Sep 2024 09:48:48 +0800 Subject: [PATCH] Remove duplicate method --- Server/db/mongo/modules/checkModule.js | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/Server/db/mongo/modules/checkModule.js b/Server/db/mongo/modules/checkModule.js index c0f4b2d2e..845a431ee 100644 --- a/Server/db/mongo/modules/checkModule.js +++ b/Server/db/mongo/modules/checkModule.js @@ -259,20 +259,6 @@ const updateChecksTTL = async (teamId, ttl) => { } }; -const updateChecksTTL = async (teamId, ttl) => { - try { - await Check.collection.dropIndex("expiry_1"); - await Check.collection.createIndex( - { expiry: 1 }, - { expireAfterSeconds: ttl } // TTL in seconds, adjust as necessary - ); - } catch (error) { - error.service = SERVICE_NAME; - error.method = "updateChecksTTL"; - throw error; - } -}; - module.exports = { createCheck, getChecksCount,