aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorilyayudovin <ilyayudovin123@gmail.com>2020-06-11 21:30:25 +0300
committerilyayudovin <ilyayudovin123@gmail.com>2020-06-11 21:30:25 +0300
commitf054a45cbefae5a6e7736af85e173fc7214dcc2c (patch)
tree85f4d502c3fc1fa0f58b400d45782be72ec0879b
parent2b876318d2aeca5183e0a57277904c7332a7aa0e (diff)
downloadwhich-api-f054a45cbefae5a6e7736af85e173fc7214dcc2c.tar.gz
feat: add generate votes
-rw-r--r--populateDb.ts16
1 files changed, 8 insertions, 8 deletions
diff --git a/populateDb.ts b/populateDb.ts
index 732cb51..88cb6a6 100644
--- a/populateDb.ts
+++ b/populateDb.ts
@@ -23,23 +23,23 @@ const polls = [{
contents: {
left:{
url: 'https://cdn.psychologytoday.com/sites/default/files/field_blog_entry_images/2019-06/pexels-photo-556667.jpeg',
- votes: 0
- },
+ votes: Math.floor(Math.random() * 101)
+},
right:{
url: 'https://images.pexels.com/photos/556666/pexels-photo-556666.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500',
- votes: 0
- }
+ votes: Math.floor(Math.random() * 101)
+}
}
},{
contents: {
left:{
url: 'https://cdn.psychologytoday.com/sites/default/files/field_blog_entry_images/2019-06/pexels-photo-556667.jpeg',
- votes: 0
- },
+ votes: Math.floor(Math.random() * 101)
+},
right:{
url: 'https://images.pexels.com/photos/556666/pexels-photo-556666.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500',
- votes: 0
- }
+ votes: Math.floor(Math.random() * 101)
+}
}
}];