TryGhost/Ghost

View on GitHub
apps/admin-x-framework/src/utils/api/fetchApi.ts

Summary

Maintainability
A
2 hrs
Test Coverage

Function useFetchApi has 71 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const useFetchApi = () => {
    const {ghostVersion, sentryDSN} = useFramework();

    // eslint-disable-next-line @typescript-eslint/no-explicit-any
    return async <ResponseData = any>(endpoint: string | URL, {headers = {}, retry, ...options}: RequestOptions = {}): Promise<ResponseData> => {
Severity: Major
Found in apps/admin-x-framework/src/utils/api/fetchApi.ts - About 2 hrs to fix

    There are no issues that match your filters.

    Category
    Status