projects
/
vchess.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6d596af
)
Remove unused parameters in setAndSendLoginToken()
author
Benjamin Auder
<benjamin.auder@somewhere>
Fri, 22 May 2020 16:07:49 +0000
(18:07 +0200)
committer
Benjamin Auder
<benjamin.auder@somewhere>
Fri, 22 May 2020 16:07:49 +0000
(18:07 +0200)
server/routes/users.js
patch
|
blob
|
blame
|
history
diff --git
a/server/routes/users.js
b/server/routes/users.js
index
dfe2fa2
..
38c5d74
100644
(file)
--- a/
server/routes/users.js
+++ b/
server/routes/users.js
@@
-48,7
+48,7
@@
router.post('/register', access.unlogged, access.ajax, (req,res) => {
name: name,
email: email
};
name: name,
email: email
};
- setAndSendLoginToken("Welcome to " + params.siteURL, user
, res
);
+ setAndSendLoginToken("Welcome to " + params.siteURL, user);
res.json({});
}
});
res.json({});
}
});
@@
-108,7
+108,7
@@
router.put('/update', access.logged, access.ajax, (req,res) => {
// Authentication-related methods:
// to: object user (to who we send an email)
// Authentication-related methods:
// to: object user (to who we send an email)
-function setAndSendLoginToken(subject, to
, res
) {
+function setAndSendLoginToken(subject, to) {
// Set login token and send welcome(back) email with auth link
const token = genToken(params.token.length);
UserModel.setLoginToken(token, to.id);
// Set login token and send welcome(back) email with auth link
const token = genToken(params.token.length);
UserModel.setLoginToken(token, to.id);
@@
-128,7
+128,7
@@
router.get('/sendtoken', access.unlogged, access.ajax, (req,res) => {
if (UserModel.checkNameEmail({ [type]: nameOrEmail })) {
UserModel.getOne(type, nameOrEmail, (err,user) => {
access.checkRequest(res, err, user, "Unknown user", () => {
if (UserModel.checkNameEmail({ [type]: nameOrEmail })) {
UserModel.getOne(type, nameOrEmail, (err,user) => {
access.checkRequest(res, err, user, "Unknown user", () => {
- setAndSendLoginToken("Token for " + params.siteURL, user
, res
);
+ setAndSendLoginToken("Token for " + params.siteURL, user);
res.json({});
});
});
res.json({});
});
});