jfilter/frag-den-staat-app

View on GitHub
src/utils/networking.js

Summary

Maintainability
A
2 hrs
Test Coverage

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

function getFromCacheOrFetch(url, additionalHeaders = {}) {
  return new Promise((resolve, reject) => {
    cache
      .get(url)
      .then(value => {
Severity: Minor
Found in src/utils/networking.js - About 1 hr to fix

    Function fetchAndDispatch has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

      buildUrl,
      dispatch,
      beforeFetch,
      onSuccessFetch,
      onErrorFetch,
    Severity: Minor
    Found in src/utils/networking.js - About 45 mins to fix

      Function fetchMultipleAndDispatch has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

        urls,
        dispatch,
        beforeFetch,
        onSuccessFetch,
        onErrorFetch
      Severity: Minor
      Found in src/utils/networking.js - About 35 mins to fix

        There are no issues that match your filters.

        Category
        Status