Showing 11 of 85 total issues
Function seed
has 162 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exports.seed = function (knex) {
// Deletes ALL existing entries
return knex('states')
.del()
.then(function () {
Function up
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exports.up = function (knex) {
return knex.schema.createTable('reviews', tbl => {
tbl.increments();
tbl.string('job_title').notNullable();
tbl.integer('start_date');
Function seed
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exports.seed = function (knex) {
// Deletes ALL existing entries
return knex('users')
.del()
.then(function () {
Function findReviewsById
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function findReviewsById(revId) {
return db('reviews as r')
.select(
'r.id as review_id',
'u.id as user_id',
Function findReviews
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function findReviews() {
return db('reviews as r')
.select(
'r.id as review_id',
'u.id as user_id',
Function findUserReviewsById
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function findUserReviewsById(revId) {
return db('reviews as r')
.select(
'r.id as review_id',
'u.id as user_id',
Function findUserReviews
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function findUserReviews(userId) {
return db('reviews as r')
.select(
'r.id as review_id',
'u.id as user_id',
Function findUserById
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function findUserById(userId) {
return db('users as u')
.where('id', userId)
.select(
'u.id',
Function down
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exports.down = function (knex) {
return knex('users')
.del()
.then(() => {
return knex.schema.alterTable('users', tbl => {
Function up
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exports.up = function (knex) {
return knex('users')
.del()
.then(() => {
return knex.schema.alterTable('users', tbl => {
Consider simplifying this complex logical expression. Open
Open
} else if (
!req.body.password ||
!req.body.email ||
!req.body.track_id ||
!req.body.first_name ||