refactor(api): changed fetching data from the new api endpoint

This commit is contained in:
2026-04-04 21:13:43 +02:00
parent a37c9916b5
commit a86ba561ea
4 changed files with 19 additions and 13 deletions
+4 -1
View File
@@ -130,7 +130,10 @@ export const useStore = defineStore('store', {
async fetchVehiclesAPI() {
try {
const response = await this.httpClient.get<API.VehiclesData.Response>('api/getVehiclesData');
// this.vehiclesData = response.;
this.vehiclesData = response.vehicles.map((v) => ({
...v,
group: response.vehicleGroups.find((g) => g.id == v.vehicleGroupsId)!,
}));
console.log(response);
} catch (error) {