cleanup http

This commit is contained in:
2023-12-10 15:22:33 +01:00
parent 39c3cf2329
commit 82a9a9165f
8 changed files with 21 additions and 42 deletions
@@ -56,6 +56,7 @@ import { URLs } from '../../scripts/utils/apiURLs';
import { useMainStore } from '../../store/mainStore';
import Loading from '../Global/Loading.vue';
import { API } from '../../typings/api';
import http from '../../http';
export default defineComponent({
components: { Loading },
@@ -90,15 +91,11 @@ export default defineComponent({
}
const statsData: API.DispatcherStats.Response = await (
await axios.get(
`${URLs.stacjownikAPI}/api/getDispatcherInfo?name=${this.store.dispatcherStatsName}`
)
await http.get('api/getDispatcherInfo?name=${this.store.dispatcherStatsName}')
).data;
const timetables: API.TimetableHistory.Response = await (
await axios.get(
`${URLs.stacjownikAPI}/api/getTimetables?authorName=${this.store.dispatcherStatsName}`
)
await http.get('api/getTimetables?authorName=${this.store.dispatcherStatsName}')
).data;
this.timetables = timetables;