lib/journey/model.js
Function generate
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
schema.statics.generate = function (data, callback) {
if (!data.locations || !data.locations.length || data.locations.length < 2) {
return callback(new Error('Journey requires 2 or more locations.'))
}