From 716cd2057fe072c7993f745610e0964f4538ec27 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Sat, 27 Apr 2019 13:17:31 -0400 Subject: [PATCH] reuse baseUrl for releases --- static/releases.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/releases.js b/static/releases.js index 8c90e4b8..4b88429b 100644 --- a/static/releases.js +++ b/static/releases.js @@ -1,5 +1,6 @@ "use strict"; +const baseUrl = "https://seamlessupdate.app/"; const devices = ["blueline", "crosshatch", "taimen", "walleye"]; const channels = ["stable", "beta"]; @@ -28,7 +29,7 @@ function deviceModel(device) { for (const channel of channels) { for (const device of devices) { - fetch("https://seamlessupdate.app/" + device + "-" + channel).then(response => { + fetch(baseUrl + device + "-" + channel).then(response => { if (!response.ok) { return Promise.reject(); } @@ -38,7 +39,6 @@ for (const channel of channels) { const date = new Date(parseInt(metadata[1], 10) * 1000); const dateString = date.toISOString().replace("T", " ").replace("Z", "").split(".")[0]; - const baseUrl = "https://seamlessupdate.app/"; const versionBaseUrl = "https://github.com/GrapheneOS/platform_manifest/releases/tag/"; const factoryFilename = device + "-factory-" + metadata[0] + ".zip";