src/server/db/_seed_helpers.js
File _seed_helpers.js
has 300 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
(function() {
'use strict';
const knex = require('./connection');
Function insertLessons
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function insertLessons(chapters) {
// get chapter order number
const chapterOrder = chapters.map((chapter) => {
return chapter.order_number;
});
Function insertMessages
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function insertMessages(userID) {
return Promise.all([
knex('messages')
.insert({
content: 'Awesome lesson!',
Function insertCodes
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function insertCodes() {
return Promise.all([
knex('codes').insert({
verify_code: 'oGvufQsOUL7264B8M0g4J5lkr1VcyYiR'
}),
Function createLesson
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
lessonOrder, chapterOrder, lessonName,
lessonContent, chapterID, lessonActive,
knex, Promise