From e5fe727ccd4ca3d01d46094568513b78f9c666e6 Mon Sep 17 00:00:00 2001 From: Spythere Date: Sun, 3 Sep 2023 17:58:55 +0200 Subject: [PATCH] aktualizacja URLi --- src/scripts/utils/apiURLs.ts | 2 +- src/store/store.ts | 4 +--- vite.config.ts | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/scripts/utils/apiURLs.ts b/src/scripts/utils/apiURLs.ts index afe5bb2..1211a68 100644 --- a/src/scripts/utils/apiURLs.ts +++ b/src/scripts/utils/apiURLs.ts @@ -2,6 +2,6 @@ export const URLs = { stacjownikAPI: import.meta.env.VITE_APP_API_DEV == 1 && !import.meta.env.PROD ? 'http://localhost:3001' - : 'https://spythere.pl', + : 'https://stacjownik.spythere.pl', stacjownikAPIDev: 'localhost:3000', }; diff --git a/src/store/store.ts b/src/store/store.ts index 7c68e4c..8b6985c 100644 --- a/src/store/store.ts +++ b/src/store/store.ts @@ -286,9 +286,7 @@ export const useStore = defineStore('store', { }, async fetchStationsGeneralInfo() { - const sceneryData: StationJSONData[] = await ( - await axios.get(`${URLs.stacjownikAPI}/api/getSceneries?timestamp=${Math.floor(Date.now() / 1800000)}`) - ).data; + const sceneryData: StationJSONData[] = await (await axios.get(`${URLs.stacjownikAPI}/api/getSceneries`)).data; if (!sceneryData) { this.dataStatuses.sceneries = DataStatus.Error; diff --git a/vite.config.ts b/vite.config.ts index d69430c..fd3e769 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -15,7 +15,7 @@ export default defineConfig({ globPatterns: ['**/*.{js,css,html,png,svg,jpg}'], runtimeCaching: [ { - urlPattern: new RegExp('^https://spythere.pl/api/getSceneries', 'i'), + urlPattern: new RegExp('^https://stacjownik.spythere.pl/api/getSceneries', 'i'), handler: 'NetworkFirst', options: { cacheName: 'sceneries-cache',