Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Step 3.3: Add some data to the parties collection
- Loading branch information
Kamil Kisiela
authored and
Dotan Simha
committed
Nov 22, 2016
1 parent
c33979c
commit 49a3294
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { Meteor } from 'meteor/meteor'; | ||
import { Parties } from '../collections/parties'; | ||
|
||
Meteor.startup(() => { | ||
if (Parties.find().count() === 0) { | ||
const parties = [{ | ||
'name': 'Dubstep-Free Zone', | ||
'description': 'Fast just got faster with Nexus S.' | ||
}, { | ||
'name': 'All dubstep all the time', | ||
'description': 'Get it on!' | ||
}, { | ||
'name': 'Savage lounging', | ||
'description': 'Leisure suit required. And only fiercest manners.' | ||
}]; | ||
|
||
parties.forEach((party) => { | ||
Parties.insert(party) | ||
}); | ||
} | ||
}); |