From 6f51f79c4c331e25923b68722887493c738eabcb Mon Sep 17 00:00:00 2001 From: Spythere Date: Fri, 13 Mar 2026 23:24:10 +0100 Subject: [PATCH] chore: added parallel static data refresh --- src/store/apiStore.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/store/apiStore.ts b/src/store/apiStore.ts index a93247b..5e697c5 100644 --- a/src/store/apiStore.ts +++ b/src/store/apiStore.ts @@ -59,9 +59,11 @@ export const useApiStore = defineStore('apiStore', { async updateTick(t: number) { // Static data refresh if (t >= this.nextDataCheckTime) { - await this.fetchStationsGeneralInfo(); - await this.fetchVehiclesInfo(); - await this.fetchDonatorsData(); + await Promise.all([ + this.fetchStationsGeneralInfo(), + this.fetchVehiclesInfo(), + this.fetchDonatorsData() + ]); this.nextDataCheckTime = t + 3600000; }