diff --git a/src/components/JournalView/DriverStats.vue b/src/components/JournalView/DriverStats.vue
index dce48cf..b91b517 100644
--- a/src/components/JournalView/DriverStats.vue
+++ b/src/components/JournalView/DriverStats.vue
@@ -49,7 +49,7 @@
-
-
diff --git a/src/scripts/interfaces/api/TimetablesAPIData.ts b/src/scripts/interfaces/api/TimetablesAPIData.ts
index c98a160..18aecb2 100644
--- a/src/scripts/interfaces/api/TimetablesAPIData.ts
+++ b/src/scripts/interfaces/api/TimetablesAPIData.ts
@@ -1,7 +1,3 @@
-export interface TimetablesAPIData {
- errorMessage: string | null;
- response: TimetableHistory[] | null;
-}
export interface TimetableHistory {
timetableId: number;
diff --git a/src/scripts/utils/apiURLs.ts b/src/scripts/utils/apiURLs.ts
index b82adcc..13de864 100644
--- a/src/scripts/utils/apiURLs.ts
+++ b/src/scripts/utils/apiURLs.ts
@@ -1,10 +1,7 @@
export const URLs = {
- sceneryData: "https://spythere.github.io/api/stationData.json",
- sceneryDataDev: "http://127.0.0.1:8000/data",
- stations: "https://api.td2.info.pl:9640/?method=getStationsOnline",
- dispatchers: "https://api.td2.info.pl:9640/?method=readFromSWDR&value=getDispatcherStatusList%3B1",
- stacjownikAPI: "https://stacjownik.eu-4.evennode.com",
- stacjownikAPIDev: "http://localhost:3001"
+ stacjownikAPI2: 'https://stacjownik.eu-4.evennode.com',
+ stacjownikAPI: 'http://localhost:3000',
+ stacjownikAPIDev: 'http://localhost:3000',
// trains: "https://api.td2.info.pl:9640/?method=getTrainsOnline",
// getTimetableURL: (trainNo: string | number, region = "eu") => `https://api.td2.info.pl:9640/?method=readFromSWDR&value=getTimetable%3B${trainNo}%3B${region}`
-};
\ No newline at end of file
+};
diff --git a/src/store/store.ts b/src/store/store.ts
index f6fa370..a1a43a2 100644
--- a/src/store/store.ts
+++ b/src/store/store.ts
@@ -37,7 +37,7 @@ export const useStore = defineStore('store', {
stationCount: 0,
webSocket: undefined,
-
+
dispatcherStatsName: '',
dispatcherStatsData: undefined,
@@ -258,8 +258,8 @@ export const useStore = defineStore('store', {
async fetchStationsGeneralInfo() {
const sceneryData: StationJSONData[] = await (
- await axios.get(`${URLs.stacjownikAPI}/api/getSceneryData?timestamp=${Math.floor(Date.now() / 1800000)}`)
- ).data.response;
+ await axios.get(`${URLs.stacjownikAPI}/api/getSceneries?timestamp=${Math.floor(Date.now() / 1800000)}`)
+ ).data;
if (!sceneryData) {
this.dataStatuses.sceneries = DataStatus.Error;
@@ -342,9 +342,16 @@ export const useStore = defineStore('store', {
socket.on('UPDATE', (data: APIData) => {
this.apiData = data;
this.setOnlineData();
+
+ console.log(data);
+
+ });
+
+ socket.emit('FETCH_DATA', {}, (data: APIData) => {
+ this.apiData = data;
+ this.setOnlineData();
});
- socket.emit('connection');
this.webSocket = socket;
},
diff --git a/src/views/SceneryView.vue b/src/views/SceneryView.vue
index bf1c5a5..c8a11f4 100644
--- a/src/views/SceneryView.vue
+++ b/src/views/SceneryView.vue
@@ -40,25 +40,20 @@