aboutsummaryrefslogtreecommitdiff
path: root/populateDb.ts
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-06-25 18:52:01 +0300
committereug-vs <eug-vs@keemail.me>2020-06-25 18:52:01 +0300
commitfe529f4a7739ac6dd9a30652279818519565ec6a (patch)
tree15bb089fb7f8342c1ee63e3a7efa8834b578db3e /populateDb.ts
parent0afe8f1530affad1e58a65385b2a4bf888ab86cb (diff)
downloadwhich-api-fe529f4a7739ac6dd9a30652279818519565ec6a.tar.gz
style!: fix all linting errors
Diffstat (limited to 'populateDb.ts')
-rw-r--r--populateDb.ts6
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 || ''));
});