From 53c2473b6f2cd69078a3ac38100abe0d095df8cd Mon Sep 17 00:00:00 2001 From: FMaz Date: Sat, 5 Oct 2024 09:51:54 -0300 Subject: [PATCH] Service worker debug mode will default to the US notifications --- scripts/vh_service_worker.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/vh_service_worker.js b/scripts/vh_service_worker.js index 531bfa9..fe4ad03 100644 --- a/scripts/vh_service_worker.js +++ b/scripts/vh_service_worker.js @@ -1,4 +1,4 @@ -const DEBUG_MODE = false; // Will always display notification even if they are not new +const DEBUG_MODE = false; //Will switch the notification countries to "com" const VINE_HELPER_API_V5_URL = "https://api.vinehelper.ovh"; //const VINE_HELPER_API_V5_URL = "http://127.0.0.1:3000"; const VINE_HELPER_API_V5_WS_URL = "wss://api.vinehelper.ovh"; @@ -127,7 +127,7 @@ function connectWebSocket() { socket = io.connect(VINE_HELPER_API_V5_WS_URL, { query: { - countryCode: Settings.get("general.country"), + countryCode: DEBUG_MODE ? "com" : Settings.get("general.country"), uuid: Settings.get("general.uuid", false), }, // Pass the country code as a query parameter transports: ["websocket"], @@ -222,7 +222,7 @@ async function fetchLast100Items(fetchAll = false) { const content = { api_version: 5, - country: vineCountry, + country: DEBUG_MODE ? "com" : vineCountry, action: "get_latest_notifications", uuid: Settings.get("general.uuid", false), };