mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-16 10:58:16 +01:00
Fix:Get libraries endpoint #1296
This commit is contained in:
parent
0592a41d4f
commit
3e15e09c07
@ -59,7 +59,9 @@ class LibraryController {
|
||||
findAll(req, res) {
|
||||
const librariesAccessible = req.user.librariesAccessible || []
|
||||
if (librariesAccessible && librariesAccessible.length) {
|
||||
return res.json(this.db.libraries.filter(lib => librariesAccessible.includes(lib.id)).map(lib => lib.toJSON()))
|
||||
return res.json({
|
||||
libraries: this.db.libraries.filter(lib => librariesAccessible.includes(lib.id)).map(lib => lib.toJSON())
|
||||
})
|
||||
}
|
||||
|
||||
res.json({
|
||||
|
Loading…
Reference in New Issue
Block a user