mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-11-27 19:02:44 +01:00
Update UserController.js to respond with objects
Changes: - `findAll` (GET /api/users)
This commit is contained in:
1 parent
b84882d9d1
commit
0851050392
1 file changed
+3
-1
@@ -12,7 +12,9 @@ class UserController {
|
||||
if (!req.user.isAdminOrUp) return res.sendStatus(403)
|
||||
const hideRootToken = !req.user.isRoot
|
||||
const users = this.db.users.map(u => this.userJsonWithItemProgressDetails(u, hideRootToken))
|
||||
res.json(users)
|
||||
res.json({
|
||||
users: users
|
||||
})
|
||||
}
|
||||
|
||||
findOne(req, res) {
|
||||
|
||||
Reference in new issue
Block a user