mirror of
https://github.com/jellyfin/jellyfin-vue.git
synced 2024-12-04 04:01:26 +00:00
fix(api): fix typescript issues with Axios instance parameter in API plugins
This commit is contained in:
parent
c4fd2fbdac
commit
6ef1a6f164
@ -1,4 +1,5 @@
|
||||
import { Context } from '@nuxt/types';
|
||||
import { AxiosInstance } from 'axios';
|
||||
import { ImageApi } from '~/api/api';
|
||||
import { Configuration } from '~/api/configuration';
|
||||
import { PluginInjection } from '~/types/utils';
|
||||
@ -22,6 +23,6 @@ declare module 'vue/types/vue' {
|
||||
export default (context: Context, inject: PluginInjection): void => {
|
||||
const config = new Configuration();
|
||||
|
||||
const imageApi = new ImageApi(config, '', context.$axios);
|
||||
const imageApi = new ImageApi(config, '', context.$axios as AxiosInstance);
|
||||
inject('imageApi', imageApi);
|
||||
};
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { Context } from '@nuxt/types';
|
||||
import { AxiosInstance } from 'axios';
|
||||
import { ItemsApi } from '~/api/api';
|
||||
import { Configuration } from '~/api/configuration';
|
||||
import { PluginInjection } from '~/types/utils';
|
||||
@ -22,6 +23,6 @@ declare module 'vue/types/vue' {
|
||||
export default (context: Context, inject: PluginInjection): void => {
|
||||
const config = new Configuration();
|
||||
|
||||
const itemsApi = new ItemsApi(config, '', context.$axios);
|
||||
const itemsApi = new ItemsApi(config, '', context.$axios as AxiosInstance);
|
||||
inject('itemsApi', itemsApi);
|
||||
};
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { Context } from '@nuxt/types';
|
||||
import { AxiosInstance } from 'axios';
|
||||
import { UserApi } from '~/api/api';
|
||||
import { Configuration } from '~/api/configuration';
|
||||
import { PluginInjection } from '~/types/utils';
|
||||
@ -22,6 +23,6 @@ declare module 'vue/types/vue' {
|
||||
export default (context: Context, inject: PluginInjection): void => {
|
||||
const config = new Configuration();
|
||||
|
||||
const userApi = new UserApi(config, '', context.$axios);
|
||||
const userApi = new UserApi(config, '', context.$axios as AxiosInstance);
|
||||
inject('userApi', userApi);
|
||||
};
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { Context } from '@nuxt/types';
|
||||
import { AxiosInstance } from 'axios';
|
||||
import { UserViewsApi } from '~/api/api';
|
||||
import { Configuration } from '~/api/configuration';
|
||||
import { PluginInjection } from '~/types/utils';
|
||||
@ -22,6 +23,10 @@ declare module 'vue/types/vue' {
|
||||
export default (context: Context, inject: PluginInjection): void => {
|
||||
const config = new Configuration();
|
||||
|
||||
const userViewsApi = new UserViewsApi(config, '', context.$axios);
|
||||
const userViewsApi = new UserViewsApi(
|
||||
config,
|
||||
'',
|
||||
context.$axios as AxiosInstance
|
||||
);
|
||||
inject('userViewsApi', userViewsApi);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user