Lambda-School-Labs/designhub-be

View on GitHub

Showing 3 of 3 total issues

Identical blocks of code found in 2 locations. Consider refactoring.
Open

async search(_, { searchText }) {
const userText = searchText.replace(/\s+/g, '').toLowerCase();
const projectText = searchText.toLowerCase();
try {
const users = await db('users')
Severity: Major
Found in resolvers/Mutation/index.js and 1 other location - About 1 day to fix
resolvers/Mutation/Search.js on lines 3..24

Identical blocks of code found in 2 locations. Consider refactoring.
Open

async function search(_, { searchText }) {
const userText = searchText.replace(/\s+/g, '').toLowerCase();
const projectText = searchText.toLowerCase();
try {
const users = await db('users')
Severity: Major
Found in resolvers/Mutation/Search.js and 1 other location - About 1 day to fix
resolvers/Mutation/index.js on lines 158..179

Function seed has 85 lines of code (exceeds 50 allowed). Consider refactoring.
Open

exports.seed = function (knex) {
return knex('users')
.del()
.then(function () {
return knex('users').insert([
Severity: Major
Found in data/seeds/01_users.js - About 2 hrs to fix
    Severity
    Category
    Status
    Source
    Language