Skip to content

Commit

Permalink
fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Huskydog9988 committed Sep 29, 2023
1 parent 65f6f24 commit f1d22df
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/utils/fetch.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { AxiosError, AxiosInstance, AxiosRequestHeaders, AxiosResponseHeaders } from 'axios';
import { AxiosError, AxiosInstance, AxiosResponseHeaders } from 'axios';
import { CommentSortByMedia, ListQueryByType, RecommendedPeriod, ReleasesCountry, UpdatedStartDate } from '../trakt';
import { buildUrl } from './buildUrl';
import { TraktHttpError } from './error';

export interface Filters {
/**
Expand Down Expand Up @@ -81,7 +82,7 @@ export interface ApiResponse<T> {
/**
* Reponse data
*/
data: T;
data?: T;

/**
* Pagination info
Expand Down Expand Up @@ -165,6 +166,7 @@ export async function fetch<T>(client: AxiosInstance, url: string, options?: Fet
const res: ApiResponse<T> = {
data: response.data,
headers: response.headers,
// error: TraktHttpError,
};

if (
Expand Down Expand Up @@ -194,6 +196,4 @@ export async function fetch<T>(client: AxiosInstance, url: string, options?: Fet
// console.error(e);
throw e;
}

return res;
}

0 comments on commit f1d22df

Please sign in to comment.