aboutsummaryrefslogtreecommitdiff
path: root/src/api/routes
diff options
context:
space:
mode:
authorPitu <[email protected]>2018-09-18 04:21:34 -0300
committerPitu <[email protected]>2018-09-18 04:21:34 -0300
commit04fb2218cd6a5d32a0b4c1d8de9b9ad43994888d (patch)
tree78bc6c3deb7e43e2cfa4ffd746db2302f757025e /src/api/routes
parent404エラ (diff)
downloadhost.fuwn.me-04fb2218cd6a5d32a0b4c1d8de9b9ad43994888d.tar.xz
host.fuwn.me-04fb2218cd6a5d32a0b4c1d8de9b9ad43994888d.zip
Return less info to the user when verifying
Diffstat (limited to 'src/api/routes')
-rw-r--r--src/api/routes/verifyGET.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/api/routes/verifyGET.js b/src/api/routes/verifyGET.js
index 29b521e..b6ade59 100644
--- a/src/api/routes/verifyGET.js
+++ b/src/api/routes/verifyGET.js
@@ -6,9 +6,16 @@ class verifyGET extends Route {
}
run(req, res, user) {
+ const returnUser = {
+ id: user.id,
+ username: user.username,
+ apiKey: user.apiKey,
+ isAdmin: user.isAdmin
+ };
+
return res.json({
message: 'Successfully verified token',
- user
+ user: returnUser
});
}
}