add population to challenge.group, challenge.leader and group.leader

This commit is contained in:
Matteo Pagliazzi
2016-02-02 21:47:12 +01:00
parent 509dffd0c7
commit 7a5aa731db
13 changed files with 207 additions and 62 deletions

View File

@@ -113,7 +113,7 @@ export async function createAndPopulateGroup (settings = {}) {
// optional details argument for the initial challenge creation and an
// optional update argument which will update the challenge via the db
export async function generateChallenge (challengeCreator, group, details = {}, update = {}) {
details.groupId = group._id;
details.group = group._id;
details.name = details.name || 'a challenge';
details.shortName = details.shortName || 'aChallenge';
details.prize = details.prize || 0;