Adding Toggle Email

EMail toggling added to the pool authed zones

Fixes #41
This commit is contained in:
Alexander Blair 2017-02-25 11:07:33 -08:00
parent 519f472666
commit 44f6391a6b

View file

@ -499,7 +499,7 @@ secureRoutes.post('/changePassword', function (req, res) {
});
secureRoutes.post('/toggleEmail', function (req, res) {
global.mysql.query("UPDATE users SET enable_email = NOT enable_email WHERE id = ?", [hmac, req.decoded.id]).then(function () {
global.mysql.query("UPDATE users SET enable_email = NOT enable_email WHERE id = ?", [req.decoded.id]).then(function () {
return res.json({'msg': 'Email toggled'});
});
});