mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-05 06:18:12 +00:00
refactor(http): removed axios; changed all requests to native fetch
This commit is contained in:
@@ -127,9 +127,8 @@ export default defineComponent({
|
||||
this.station?.name || this.onlineScenery?.name
|
||||
}&countFrom=${countFrom}&countLimit=${countLimit}`;
|
||||
|
||||
const historyAPIData: API.DispatcherHistory.Response = await (
|
||||
await this.apiStore.client!.get(requestString)
|
||||
).data;
|
||||
const historyAPIData: API.DispatcherHistory.Response =
|
||||
await this.apiStore.client.get(requestString);
|
||||
|
||||
this.dataStatus = Status.Data.Loaded;
|
||||
return historyAPIData;
|
||||
|
||||
@@ -149,11 +149,12 @@ export default defineComponent({
|
||||
requestFilters['returnType'] = 'short';
|
||||
|
||||
try {
|
||||
const response: API.TimetableHistory.ResponseShort = await (
|
||||
await this.apiStore.client!.get('api/getTimetables', {
|
||||
params: requestFilters
|
||||
})
|
||||
).data;
|
||||
const response: API.TimetableHistory.ResponseShort = await this.apiStore.client.get(
|
||||
'api/getTimetables',
|
||||
requestFilters
|
||||
);
|
||||
|
||||
console.log(response);
|
||||
|
||||
this.historyList = response;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user