File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " openscan3-client" ,
3- "version" : " 0.1.0 " ,
3+ "version" : " 0.1.1 " ,
44 "apiVersion" : " 0.6.0" ,
55 "description" : " Frontend client for OpenScan3 firmware devices" ,
66 "productName" : " OpenScan3" ,
Original file line number Diff line number Diff line change 11import { boot } from 'quasar/wrappers' ;
22import axios , { AxiosInstance } from 'axios' ;
3- import { api } from '../api' ;
3+ import { apiClient } from 'src/services/apiClient' ;
4+ import { useApiConfigStore } from 'src/stores/apiConfig' ;
45
56declare module '@vue/runtime-core' {
67 interface ComponentCustomProperties {
78 $axios : AxiosInstance ;
9+ $apiClient : typeof apiClient ;
10+ $apiConfig : ReturnType < typeof useApiConfigStore > ;
811 }
912}
1013
@@ -16,13 +19,14 @@ declare module '@vue/runtime-core' {
1619// for each client)
1720
1821export default boot ( ( { app } ) => {
19- // for use inside Vue files (Options API) through this.$axios and this.$api
22+ // for use inside Vue files (Options API) through this.$axios and related helpers
23+
24+ const apiConfigStore = useApiConfigStore ( ) ;
2025
2126 app . config . globalProperties . $axios = axios ;
2227 // ^ ^ ^ this will allow you to use this.$axios (for Vue Options API form)
2328 // so you won't necessarily have to import axios in each vue file
24-
25- app . config . globalProperties . $api = api ;
26- // ^ ^ ^ this will allow you to use this.$api (for Vue Options API form)
27- // so you can easily perform requests against your app's API
29+ app . config . globalProperties . $apiClient = apiClient ;
30+ app . config . globalProperties . $apiConfig = apiConfigStore ;
31+ // ^ ^ ^ expose generated API client and config store to Options API components
2832} ) ;
You can’t perform that action at this time.
0 commit comments