diff options
| author | Pitu <[email protected]> | 2017-01-31 03:43:00 -0300 |
|---|---|---|
| committer | Pitu <[email protected]> | 2017-01-31 03:43:00 -0300 |
| commit | d5c9b15ab97e17e914807b719602f13cec0704ab (patch) | |
| tree | 6095a69f6f9b065e66caf31d65ae0328f5febb05 /controllers/tokenController.js | |
| parent | Changed /panel to /dashboard (diff) | |
| download | host.fuwn.me-d5c9b15ab97e17e914807b719602f13cec0704ab.tar.xz host.fuwn.me-d5c9b15ab97e17e914807b719602f13cec0704ab.zip | |
Added username display on dashboard
Diffstat (limited to 'controllers/tokenController.js')
| -rw-r--r-- | controllers/tokenController.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/controllers/tokenController.js b/controllers/tokenController.js index 31b0b3d..7ff7d3f 100644 --- a/controllers/tokenController.js +++ b/controllers/tokenController.js @@ -11,7 +11,7 @@ tokenController.verify = function(req, res, next){ db.table('users').where('token', token).then((user) => { if(user.length === 0) return res.json({ success: false, description: 'Token mismatch' }) - return res.json({ success: true }) + return res.json({ success: true, username: user[0].username}) }).catch(function(error) { console.log(error); res.json({success: false, description: 'error'}) }) } |