api/soccerseasons/model.js
/**
   * Add fixtures to all soccerSeasons
   *
   * @param {Array} soccerSeasons An array of mongoose Documents
   * @param {function} next The next middleware
   * @this mongoose.Query
   * @return {undefined}
   */
Add fixtures to all soccerSeasons
@param {Array} soccerSeasons An array of mongoose Documents
@param {function} next The next middleware
@this mongoose.Query
@return {undefined}
Add fixtures to all soccerSeasons @param { Array } soccerSeasons An array of mongoose Documents @param { function } next The next middleware @this mongoose . Query @return { undefined }
async function addFixturesOnFind(soccerSeasons, next) {
    if (fp.isEmpty(this.getQuery())) { return next() }
    await Promise.all(fp.map(fp.partial(addFixtures, [this]), soccerSeasons))
    return next()
  }
async function addFixturesOnFind ( soccerSeasons , next ) { if ( fp . isEmpty ( this . getQuery ( ) ) ) { return next ( ) } await Promise . all ( fp . map ( fp . partial ( addFixtures , [ this ] ) , soccerSeasons ) ) return next ( ) }
Add fixtures to all soccerSeasons
 @param {Array} soccerSeasons An array of mongoose Documents
 @param {function} next The next middleware
 @this mongoose.Query
 @return {undefined}
Add fixtures to all soccerSeasons @param { Array } soccerSeasons An array of mongoose Documents @param { function } next The next middleware @this mongoose . Query @return { undefined }
// Fixtures are not needed when all soccerseasons should be shown // Promise.all() to make sure that all addFixtures // calls are finished before continuing // See: https://github.com/tc39/ecmascript-asyncawait/issues/7