usprawnienia miniaturek pojazdów

This commit is contained in:
2024-03-01 19:07:00 +01:00
parent c8d56ec442
commit 7e3c150815
6 changed files with 39 additions and 148 deletions
-14
View File
@@ -16,7 +16,6 @@ export const useApiStore = defineStore('apiStore', {
},
activeData: undefined as API.ActiveData.Response | undefined,
rollingStockData: undefined as API.RollingStock.Response | undefined,
donatorsData: [] as API.Donators.Response,
sceneryData: [] as StationJSONData[],
@@ -26,7 +25,6 @@ export const useApiStore = defineStore('apiStore', {
actions: {
async setupAPIData() {
// Static data
this.fetchStockInfoData();
this.fetchDonatorsData();
this.fetchStationsGeneralInfo();
@@ -71,18 +69,6 @@ export const useApiStore = defineStore('apiStore', {
}
},
async fetchStockInfoData() {
try {
this.rollingStockData = (
await axios.get<API.RollingStock.Response>(
'https://raw.githubusercontent.com/Spythere/api/main/td2/data/stockInfo.json'
)
).data;
} catch (error) {
console.error('Ups! Wystąpił błąd podczas pobierania informacji o taborze z API:', error);
}
},
async fetchStationsGeneralInfo() {
const sceneryData: StationJSONData[] = (await http.get<StationJSONData[]>('api/getSceneries'))
.data;