projects
/
vchess.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b32986
)
Fix news notification system
author
Benjamin Auder
<benjamin.auder@somewhere>
Sun, 15 Mar 2020 14:41:19 +0000
(15:41 +0100)
committer
Benjamin Auder
<benjamin.auder@somewhere>
Sun, 15 Mar 2020 14:41:19 +0000
(15:41 +0100)
server/routes/users.js
patch
|
blob
|
blame
|
history
diff --git
a/server/routes/users.js
b/server/routes/users.js
index
389625c
..
fc29730
100644
(file)
--- 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]+$/))