js/services/generic.js
Function list
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
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
Function create
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
create (endpoint, model, token, fetch) {
URIValueType(endpoint, ['GenericAPIService.create', 'endpoint:URIValue'])
MaybeJsonWebTokenType(token, ['GenericAPIService.create', 'token:?JsonWebToken'])
fetch = fetch !== false