diff options
author | ilyayudovin <ilyayudovin123@gmail.com> | 2020-06-11 21:30:25 +0300 |
---|---|---|
committer | ilyayudovin <ilyayudovin123@gmail.com> | 2020-06-11 21:30:25 +0300 |
commit | f054a45cbefae5a6e7736af85e173fc7214dcc2c (patch) | |
tree | 85f4d502c3fc1fa0f58b400d45782be72ec0879b /populateDb.ts | |
parent | 2b876318d2aeca5183e0a57277904c7332a7aa0e (diff) | |
download | which-api-f054a45cbefae5a6e7736af85e173fc7214dcc2c.tar.gz |
feat: add generate votes
Diffstat (limited to 'populateDb.ts')
-rw-r--r-- | populateDb.ts | 16 |
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) +} } }]; |