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() {
|
||||
try {
|
||||
const response = await axios.get<GithubAPI.Donators.Response>(
|
||||
'https://raw.githubusercontent.com/Spythere/api/main/td2/data/donators.json'
|
||||
const response = await axios.get<API.Donators.Response>(
|
||||
`${URLs.stacjownikAPI}/api/getDonators`
|
||||
);
|
||||
|
||||
if (response.data) this.donatorsData = response.data;
|
||||
|
||||
@@ -15,7 +15,7 @@ export interface StoreState {
|
||||
stationList: Station[];
|
||||
activeData: Websocket.ActiveData;
|
||||
rollingStockData?: API.RollingStock.Response;
|
||||
donatorsData: GithubAPI.Donators.Response;
|
||||
donatorsData: API.Donators.Response;
|
||||
|
||||
regionOnlineCounters: RegionCounters[];
|
||||
|
||||
|
||||
+4
-4
@@ -274,6 +274,10 @@ export namespace API {
|
||||
}[];
|
||||
}
|
||||
}
|
||||
|
||||
export namespace Donators {
|
||||
export type Response = string[];
|
||||
}
|
||||
}
|
||||
|
||||
export namespace Websocket {
|
||||
@@ -328,8 +332,4 @@ export namespace GithubAPI {
|
||||
body: string;
|
||||
}
|
||||
}
|
||||
|
||||
export namespace Donators {
|
||||
export type Response = string[];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user