mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 21:38:13 +00:00
Poprawki w widoku historii scenerii
This commit is contained in:
@@ -73,7 +73,7 @@ interface SceneryHistory {
|
||||
}
|
||||
|
||||
interface HistoryResultAPI {
|
||||
result: SceneryHistory;
|
||||
response: SceneryHistory;
|
||||
errorMessage?: any;
|
||||
}
|
||||
|
||||
@@ -100,13 +100,16 @@ export default defineComponent({
|
||||
|
||||
async mounted() {
|
||||
try {
|
||||
const apiResult: HistoryResultAPI = (await axios.get(`${API_URL}?name=${this.name}`)).data;
|
||||
const apiResult: HistoryResultAPI = (await axios.get(`${API_URL}?name=${this.name}&historyCount=100`)).data;
|
||||
|
||||
console.log(apiResult);
|
||||
|
||||
|
||||
if (!apiResult || !apiResult.response) return;
|
||||
this.isLoaded = true;
|
||||
if (!apiResult || !apiResult.result) return;
|
||||
|
||||
if (!apiResult.errorMessage) {
|
||||
this.dispatcherHistory = apiResult.result.dispatcherHistory;
|
||||
this.dispatcherHistory = apiResult.response.dispatcherHistory;
|
||||
|
||||
this.dispatcherTimeline = this.dispatcherHistory
|
||||
.reduce((acc, dispatcher) => {
|
||||
|
||||
Reference in New Issue
Block a user