projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Experimental news notification system + fix Eightpieces variant
[vchess.git]
/
server
/
routes
/
users.js
diff --git
a/server/routes/users.js
b/server/routes/users.js
index
2b38c37
..
389625c
100644
(file)
--- a/
server/routes/users.js
+++ b/
server/routes/users.js
@@
-81,6
+81,12
@@
router.put('/update', access.logged, access.ajax, (req,res) => {
}
});
}
});
+// Special route to update newsRead timestamp:
+router.put('/newsread', access.logged, access.ajax, (req,res) => {
+ UserModel.setNewsRead(req.userId);
+ res.json({});
+});
+
// Authentication-related methods:
// to: object user (to who we send an email)
// Authentication-related methods:
// to: object user (to who we send an email)
@@
-90,7
+96,7
@@
function setAndSendLoginToken(subject, to, res)
const token = genToken(params.token.length);
UserModel.setLoginToken(token, to.id);
const body =
const token = genToken(params.token.length);
UserModel.setLoginToken(token, to.id);
const body =
- "Hello " + to.name + "!" + `
+ "Hello " + to.name + "
!" + `
` +
"Access your account here: " +
params.siteURL + "/#/authenticate/" + token + `
` +
"Access your account here: " +
params.siteURL + "/#/authenticate/" + token + `