From 5c026d9a2c5546aa5b0d6882ae54cdb7bb36bdeb Mon Sep 17 00:00:00 2001 From: Benjamin Auder Date: Sun, 15 Mar 2020 15:41:19 +0100 Subject: [PATCH] Fix news notification system --- server/routes/users.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/server/routes/users.js b/server/routes/users.js index 389625c1..fc29730c 100644 --- a/server/routes/users.js +++ b/server/routes/users.js @@ -41,9 +41,16 @@ router.get("/whoami", access.ajax, (req,res) => { email: user.email, id: user.id, notify: user.notify, + newsRead: user.newsRead }); }; - const anonymous = {name:"", email:"", id:0, notify:false}; + const anonymous = { + name: "", + email: "", + id: 0, + notify: false, + newsRead: 0 + }; if (!req.cookies.token) callback(anonymous); else if (req.cookies.token.match(/^[a-z0-9]+$/)) -- 2.44.0