X-Git-Url: https://git.auder.net/variants/%24%7Bvname%7D/current/gitweb.css?a=blobdiff_plain;f=server%2Froutes%2Fusers.js;h=389625c1f3d46a3079034d3fd2fe82d10177bc23;hb=d9a7a1e40254bda6e545514596a7363048c084f9;hp=2b38c37faa8782c3af53fab90a78ba72150185f5;hpb=e57c4de4148d43e7635e09adcde4e56585aea303;p=vchess.git diff --git a/server/routes/users.js b/server/routes/users.js index 2b38c37f..389625c1 100644 --- 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) @@ -90,7 +96,7 @@ function setAndSendLoginToken(subject, to, res) 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 + `