FredericHeem/starhackit

View on GitHub
client/src/utils/rest.js

Summary

Maintainability
A
1 hr
Test Coverage

Function ajax has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function ajax(url, method, data, params, headers = headersDefault) {
    const jwt = localStorage.getItem("JWT");
    if (jwt) {
      headers.Authorization = `Bearer ${jwt}`;
    }
Severity: Minor
Found in client/src/utils/rest.js - About 1 hr to fix

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

      function ajax(url, method, data, params, headers = headersDefault) {
    Severity: Minor
    Found in client/src/utils/rest.js - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status