mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-30 18:48:55 +01:00
Update AuthorController.js to respond with objects
Changes: - `search` (GET /api/authors/search)
This commit is contained in:
parent
e04d26307e
commit
e80c3a1c5a
@ -148,7 +148,9 @@ class AuthorController {
|
||||
var limit = (req.query.limit && !isNaN(req.query.limit)) ? Number(req.query.limit) : 25
|
||||
var authors = this.db.authors.filter(au => au.name.toLowerCase().includes(q))
|
||||
authors = authors.slice(0, limit)
|
||||
res.json(authors)
|
||||
res.json({
|
||||
results: authors
|
||||
})
|
||||
}
|
||||
|
||||
async match(req, res) {
|
||||
|
Loading…
Reference in New Issue
Block a user