sannimichaelse/Parcel-Delivery

View on GitHub

Showing 6 of 6 total issues

File swagger.js has 424 lines of code (exceeds 250 allowed). Consider refactoring.
Open

export default {
  swagger: '2.0',
  info: {
    version: '1.0.0',
    title: 'Send-IT API',
Severity: Minor
Found in swagger.js - About 6 hrs to fix

    File queries.js has 336 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /* eslint-disable camelcase */
    import bcrypt from 'bcrypt';
    import moment from 'moment';
    import db from '../utilities/connection/connect';
    
    
    Severity: Minor
    Found in server/utilities/queries.js - About 4 hrs to fix

      Function validateUserLogin has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        static validateUserLogin(email, userpassword) {
          return new Promise((resolve, reject) => {
            this.findUserByEmail(email)
              .then((res) => {
                const { password, id, is_admin } = res.rows[0];
      Severity: Minor
      Found in server/utilities/services/UserService.js - About 1 hr to fix

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

          static saveUserQuery(body) {
            const {
              firstname, lastname, othername, email, username, password,
            } = body;
        
        
        Severity: Minor
        Found in server/utilities/queries.js - About 1 hr to fix

          Function saveParcelQuery has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            static saveParcelQuery(body, userid) {
              const {
                parcel,
                weight,
                weightMetric,
          Severity: Minor
          Found in server/utilities/queries.js - About 1 hr to fix

            Function viewUserParcelsById has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              static viewUserParcelsById(req, res) {
                const userId = req.decoded.user_id;
                const { id } = req.params;
                console.log(userId,);
                if (userId != id) {
            Severity: Minor
            Found in server/controllers/ParcelController.js - About 1 hr to fix
              Severity
              Category
              Status
              Source
              Language