From f054a45cbefae5a6e7736af85e173fc7214dcc2c Mon Sep 17 00:00:00 2001 From: ilyayudovin Date: Thu, 11 Jun 2020 21:30:25 +0300 Subject: feat: add generate votes --- populateDb.ts | 16 ++++++++-------- 1 file 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) +} } }]; -- cgit v1.2.3