craftninja/exp-starter-api

View on GitHub

Showing 2 of 2 total issues

Function update has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

exports.update = async newProperties => {
  const oldProps = await this.find(newProperties.id);
  const properties = { ...oldProps, ...newProperties };
  if (newProperties.password) {
    const saltRounds = 10;
Severity: Minor
Found in models/user.js - About 1 hr to fix

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

    exports.create = async properties => {
      const errors = await validate(properties);
      if (errors) {
        return { errors };
      }
    Severity: Minor
    Found in models/user.js - About 1 hr to fix
      Severity
      Category
      Status
      Source
      Language