Add centralized API client with axios interceptors, remove vue-axios
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { defineStore } from "pinia";
|
||||
import apiClient from "@/api/client.js";
|
||||
import apiError from '@/module/apiError.js';
|
||||
|
||||
export default defineStore('performanceStore', {
|
||||
@@ -36,7 +37,7 @@ export default defineStore('performanceStore', {
|
||||
break;
|
||||
}
|
||||
try {
|
||||
const response = await this.$axios.get(api);
|
||||
const response = await apiClient.get(api);
|
||||
this.allPerformanceData = response.data;
|
||||
} catch(error) {
|
||||
apiError(error, 'Failed to load the Performance.');
|
||||
|
||||
Reference in New Issue
Block a user