bookbrainz/bookbrainz-site

View on GitHub
src/server/helpers/critiquebrainz.ts

Summary

Maintainability
A
3 hrs
Test Coverage

Function submitReviewToCB has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export async function submitReviewToCB(
    accessToken: string,
    review: Record<string, any>
): Promise<any> {
    const cbEntityType = mapEntityType[review.entityType];
Severity: Minor
Found in src/server/helpers/critiquebrainz.ts - About 1 hr to fix

    Function fetchAccessToken has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export async function fetchAccessToken(
        code: string,
        editorId: number,
        orm: Record<string, any>
    ) : Promise<any> {
    Severity: Minor
    Found in src/server/helpers/critiquebrainz.ts - About 1 hr to fix

      Function refreshAccessToken has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export async function refreshAccessToken(
          editorId: number,
          refreshToken: string,
          orm: Record<string, any>
      ): Promise<any> {
      Severity: Minor
      Found in src/server/helpers/critiquebrainz.ts - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status