From bce146927d7cd8f96a80a449eeabd736e21e9614 Mon Sep 17 00:00:00 2001 From: Oj Date: Thu, 21 Apr 2022 12:25:17 +0100 Subject: [PATCH] [Updater > Module] Minor source cleanup --- src/updater/moduleUpdater.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/updater/moduleUpdater.js b/src/updater/moduleUpdater.js index 014057b..6c9e013 100644 --- a/src/updater/moduleUpdater.js +++ b/src/updater/moduleUpdater.js @@ -16,7 +16,7 @@ let skipHost, skipModule, downloading, installing, basePath, manifestPath, downloadPath, hostUpdater, - baseUrl, baseQuery, + baseUrl, qs, checking, hostAvail, last; const resetTracking = () => { @@ -113,7 +113,7 @@ exports.init = (endpoint, { releaseChannel, version }) => { hostUpdater.setFeedURL(`${endpoint}/updates/${releaseChannel}?platform=${platform}&version=${version}`); baseUrl = `${endpoint}/modules/${releaseChannel}`; - baseQuery = { + qs = { host_version: version, platform }; @@ -136,10 +136,7 @@ const checkModules = async () => { try { const { body } = await request.get({ url: baseUrl + '/versions.json', - qs: { - ...baseQuery, - _: Math.floor(Date.now() / 300000) // 5 min intervals - } + qs }); checking = false; @@ -196,7 +193,7 @@ const downloadModule = async (name, ver) => { try { const resp = await request.get({ url, - qs: baseQuery, + qs, stream });