e-ucm/rage-analytics-backend

View on GitHub
lib/gameplays.js

Summary

Maintainability
C
7 hrs
Test Coverage

Function exports has 151 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = (function () {
    var Q = require('q');
    var Collection = require('easy-collections');
    var gameplays = {};

Severity: Major
Found in lib/gameplays.js - About 6 hrs to fix

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

        gameplays.startAttempt = function (id, player, authToken) {
            var g = new Collection(require('./db'), 'gameplays_' + id);
            g.sort = { _id: -1 };
            return gameplays.find(id, player).then(function (gameplay) {
                return g.findAndUpdate(gameplay._id.toString(), {
    Severity: Minor
    Found in lib/gameplays.js - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status