rwwarren/door-lock

View on GitHub
web/src/inc/Admin.js

Summary

Maintainability
B
4 hrs
Test Coverage

Function render has 59 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  render: function() {
    return (
      <div className="adminPage">
        <table className="userList">
          <tr>
Severity: Major
Found in web/src/inc/Admin.js - About 2 hrs to fix

    Function registerUser has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      registerUser: function(){
        //TODO check username is unique
        //email password reset?
        //fix 0 to null authyId
        //check on frontend
    Severity: Minor
    Found in web/src/inc/Admin.js - About 1 hr to fix

      Consider simplifying this complex logical expression.
      Open

          if(username && password && name && isValidEmail && (!authyID || this.validateAuthyID(authyID))){
            $.ajax({
              url: common.API_URL + common.REGISTER_USER,
              type: "POST",
              contentType: "application/json",
      Severity: Major
      Found in web/src/inc/Admin.js - About 40 mins to fix

        TODO found
        Open

            //TODO check username is unique
        Severity: Minor
        Found in web/src/inc/Admin.js by fixme

        Parsing error: Unexpected token <
        Open

                <ul id={type} className="connectedSortable">
        Severity: Minor
        Found in web/src/inc/Admin.js by eslint

        For more information visit Source: http://eslint.org/docs/rules/

        There are no issues that match your filters.

        Category
        Status