RHeactorJS/web-app

View on GitHub
js/services/generic.js

Summary

Maintainability
A
2 hrs
Test Coverage

Function list has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  list (endpoint, query, token, expectedContext) {
    URIValueType(endpoint, ['GenericAPIService.list', 'endpoint:URIValue'])
    MaybeJsonWebTokenType(token, ['GenericAPIService.get', 'token:?JsonWebToken'])
    MaybeURIValueType(expectedContext, ['GenericAPIService.list', 'expectedContext:?URIValue'])
    expectedContext = expectedContext || this.modelContext
Severity: Minor
Found in js/services/generic.js - About 1 hr to fix

    Function create has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      create (endpoint, model, token, fetch) {
        URIValueType(endpoint, ['GenericAPIService.create', 'endpoint:URIValue'])
        MaybeJsonWebTokenType(token, ['GenericAPIService.create', 'token:?JsonWebToken'])
        fetch = fetch !== false
    
    
    Severity: Minor
    Found in js/services/generic.js - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status