From 4bdada36a90d35eeb20d1a589f88824c2ef32293 Mon Sep 17 00:00:00 2001 From: Ponkhy Date: Thu, 16 Sep 2021 20:18:31 +0200 Subject: [PATCH] Removed if includes version --- server/server.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/server.js b/server/server.js index 9f6b889de..20f902ee5 100644 --- a/server/server.js +++ b/server/server.js @@ -933,6 +933,7 @@ let indexHTML = fs.readFileSync("./dist/index.html").toString(); checkLogin(socket) let backupData = JSON.parse(uploadedJSON); + let version = backupData.version.replace(/\./g, ""); console.log(`Importing Backup, User ID: ${socket.userID}, Version: ${backupData.version}`) @@ -976,7 +977,7 @@ let indexHTML = fs.readFileSync("./dist/index.html").toString(); let retryInterval = 0; - if (backupData.version.includes("1.7")) { + if (version >= 170) { retryInterval = monitorListData[i].retryInterval; } @@ -1011,7 +1012,7 @@ let indexHTML = fs.readFileSync("./dist/index.html").toString(); bean.user_id = socket.userID await R.store(bean) - if (backupData.version.includes("1.7")) { + if (version >= 170) { if (monitorListData[i].tags.length >= 1) { for (let o = 0; o < monitorListData[i].tags.length; o++) {