From 63712199736057d78a9adf19d57a9255aaf05307 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Sun, 4 Sep 2022 20:21:56 +0200 Subject: New items have 1 vote --- static/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'static/index.js') diff --git a/static/index.js b/static/index.js index 31099d6..311afc7 100644 --- a/static/index.js +++ b/static/index.js @@ -141,9 +141,11 @@ function submitNewItem(string) { } } - socket.emit("new", string); + const votes = 1; - insertItem(0, string); + socket.emit("new", votes, string); + + insertItem(votes, string); } function upvoteItem(string, incr) { -- cgit v1.2.3-70-g09d2