mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-20 19:06:06 +01:00
Update UserController.js to respond with objects
Changes: - `findAll` (GET /api/users)
This commit is contained in:
parent
b84882d9d1
commit
0851050392
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user