Showing 6 of 6 total issues
File swagger.js
has 424 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
export default {
swagger: '2.0',
info: {
version: '1.0.0',
title: 'Send-IT API',
File queries.js
has 336 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint-disable camelcase */
import bcrypt from 'bcrypt';
import moment from 'moment';
import db from '../utilities/connection/connect';
Function validateUserLogin
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static validateUserLogin(email, userpassword) {
return new Promise((resolve, reject) => {
this.findUserByEmail(email)
.then((res) => {
const { password, id, is_admin } = res.rows[0];
Function saveUserQuery
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static saveUserQuery(body) {
const {
firstname, lastname, othername, email, username, password,
} = body;
Function saveParcelQuery
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static saveParcelQuery(body, userid) {
const {
parcel,
weight,
weightMetric,
Function viewUserParcelsById
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static viewUserParcelsById(req, res) {
const userId = req.decoded.user_id;
const { id } = req.params;
console.log(userId,);
if (userId != id) {