Skip to content

Commit f054a45

Browse files
committed
feat: add generate votes
1 parent 2b87631 commit f054a45

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

populateDb.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,23 @@ const polls = [{
2323
contents: {
2424
left:{
2525
url: 'https://cdn.psychologytoday.com/sites/default/files/field_blog_entry_images/2019-06/pexels-photo-556667.jpeg',
26-
votes: 0
27-
},
26+
votes: Math.floor(Math.random() * 101)
27+
},
2828
right:{
2929
url: 'https://images.pexels.com/photos/556666/pexels-photo-556666.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500',
30-
votes: 0
31-
}
30+
votes: Math.floor(Math.random() * 101)
31+
}
3232
}
3333
},{
3434
contents: {
3535
left:{
3636
url: 'https://cdn.psychologytoday.com/sites/default/files/field_blog_entry_images/2019-06/pexels-photo-556667.jpeg',
37-
votes: 0
38-
},
37+
votes: Math.floor(Math.random() * 101)
38+
},
3939
right:{
4040
url: 'https://images.pexels.com/photos/556666/pexels-photo-556666.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500',
41-
votes: 0
42-
}
41+
votes: Math.floor(Math.random() * 101)
42+
}
4343
}
4444
}];
4545

0 commit comments

Comments
 (0)