mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 05:18:11 +00:00
zmiana API do pobierania informacji o wspierających
This commit is contained in:
@@ -310,8 +310,8 @@ export const useStore = defineStore('store', {
|
|||||||
|
|
||||||
async fetchDonatorsData() {
|
async fetchDonatorsData() {
|
||||||
try {
|
try {
|
||||||
const response = await axios.get<GithubAPI.Donators.Response>(
|
const response = await axios.get<API.Donators.Response>(
|
||||||
'https://raw.githubusercontent.com/Spythere/api/main/td2/data/donators.json'
|
`${URLs.stacjownikAPI}/api/getDonators`
|
||||||
);
|
);
|
||||||
|
|
||||||
if (response.data) this.donatorsData = response.data;
|
if (response.data) this.donatorsData = response.data;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export interface StoreState {
|
|||||||
stationList: Station[];
|
stationList: Station[];
|
||||||
activeData: Websocket.ActiveData;
|
activeData: Websocket.ActiveData;
|
||||||
rollingStockData?: API.RollingStock.Response;
|
rollingStockData?: API.RollingStock.Response;
|
||||||
donatorsData: GithubAPI.Donators.Response;
|
donatorsData: API.Donators.Response;
|
||||||
|
|
||||||
regionOnlineCounters: RegionCounters[];
|
regionOnlineCounters: RegionCounters[];
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -274,6 +274,10 @@ export namespace API {
|
|||||||
}[];
|
}[];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export namespace Donators {
|
||||||
|
export type Response = string[];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export namespace Websocket {
|
export namespace Websocket {
|
||||||
@@ -328,8 +332,4 @@ export namespace GithubAPI {
|
|||||||
body: string;
|
body: string;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export namespace Donators {
|
|
||||||
export type Response = string[];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user