app/imports/api/team/TeamCollection.js
/**
   * Returns an object representing the given team.
   * @param docID {string} the ID of the team.
   * @return {{owner: *, skills: Array, challenges: Array, developers: Array, name: *,
   *   description: *, tools: Array, open: *}}
   * @throws {Meteor.Error} if the team isn't defined.
   */
Returns an object representing the given team.
@param docID {string} the ID of the team.
Returns an object representing the given team . @param docID { string } the ID of the team .
dumpOne(docID) {
    this.assertDefined(docID);
    const { name, description, owner, open } = this.findDoc(docID);
    const selector = { teamID: docID };
    const teamChallenges = TeamChallenges.find(selector).fetch();
    const challenges = _.map(teamChallenges, (tC) => Challenges.findSlugByID(tC.challengeID));
    const teamDevelopers = TeamDevelopers.find(selector).fetch();
    const developers = _.map(teamDevelopers, (tD) => Developers.findSlugByID(tD.developerID));
    const teamSkills = TeamSkills.find(selector).fetch();
    const skills = _.map(teamSkills, (tS) => Skills.findSlugByID(tS.skillID));
    const teamTools = TeamTools.find(selector).fetch();
    const tools = _.map(teamTools, (tT) => Tools.findSlugByID(tT.toolID));
    return { name, description, owner, open, challenges, developers, skills, tools };
  }
dumpOne ( docID ) { this . assertDefined ( docID ) ; const { name , description , owner , open } = this . findDoc ( docID ) ; const selector = { teamID : docID } ; const teamChallenges = TeamChallenges . find ( selector ) . fetch ( ) ; const challenges = _ . map ( teamChallenges , ( tC ) => Challenges . findSlugByID ( tC . challengeID ) ) ; const teamDevelopers = TeamDevelopers . find ( selector ) . fetch ( ) ; const developers = _ . map ( teamDevelopers , ( tD ) => Developers . findSlugByID ( tD . developerID ) ) ; const teamSkills = TeamSkills . find ( selector ) . fetch ( ) ; const skills = _ . map ( teamSkills , ( tS ) => Skills . findSlugByID ( tS . skillID ) ) ; const teamTools = TeamTools . find ( selector ) . fetch ( ) ; const tools = _ . map ( teamTools , ( tT ) => Tools . findSlugByID ( tT . toolID ) ) ; return { name , description , owner , open , challenges , developers , skills , tools } ; }
Returns an object representing the given team.
Returns an object representing the given team .