diff options
author | Eugene Sokolov <eug-vs@keemail.me> | 2020-06-25 18:56:55 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-25 18:56:55 +0300 |
commit | 343a975413d8d3ce8194507017fb4ca01a4faf54 (patch) | |
tree | bdf1ebf9113739bfb08cd61239c117d02e273fe7 /populateDb.ts | |
parent | 32e9cd6eec8f45fd9b53c8ab3af5907c8d4064bc (diff) | |
parent | 7bf3e5020bf456b1450bb19bea43df7862cfb08e (diff) | |
download | which-api-343a975413d8d3ce8194507017fb4ca01a4faf54.tar.gz |
Merge pull request #10 from which-ecosystem/circleci
Configure CI
Diffstat (limited to 'populateDb.ts')
-rw-r--r-- | populateDb.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/populateDb.ts b/populateDb.ts index 757280a..6daa2f8 100644 --- a/populateDb.ts +++ b/populateDb.ts @@ -36,7 +36,7 @@ const choices = [ const createPoll = (authorId: string): Promise<Poll> => { const generateImageData = () => ({ - url: _.sample(imageUrls) || '', + url: _.sample(imageUrls) || '' }); return app.service('polls').create({ @@ -61,7 +61,7 @@ const createVote = (userId: string, pollId: string): Promise<Vote> => { pollId, which: _.sample(choices) }, { user: { _id: userId } }); -} +}; const populate = async () => { @@ -72,7 +72,7 @@ const populate = async () => { return createPoll(user?._id || ''); }); - const votes = await bluebird.map(users, user => { + await bluebird.map(users, user => { const pollsToVote = _.sampleSize(polls, _.random(0, POLLS_AMOUNT)); return bluebird.map(pollsToVote, poll => createVote(user?._id || '', poll?._id || '')); }); |