aboutsummaryrefslogtreecommitdiff
path: root/src/api/routes/admin/userGET.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/routes/admin/userGET.js')
-rw-r--r--src/api/routes/admin/userGET.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/api/routes/admin/userGET.js b/src/api/routes/admin/userGET.js
index 14a6c92..48c6e9b 100644
--- a/src/api/routes/admin/userGET.js
+++ b/src/api/routes/admin/userGET.js
@@ -11,7 +11,10 @@ class usersGET extends Route {
if (!id) return res.status(400).json({ message: 'Invalid user ID supplied' });
try {
- const user = await db.table('users').where({ id }).first();
+ const user = await db.table('users')
+ .select('id', 'username', 'enabled', 'createdAt', 'editedAt', 'apiKeyEditedAt', 'isAdmin')
+ .where({ id })
+ .first();
const files = await db.table('files')
.where({ userId: user.id })
.orderBy('id', 'desc');