mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-08 00:08:14 +01:00
Update SeriesController.js to respond with objects
Changes: - `search` (GET /api/series/search)
This commit is contained in:
parent
e80c3a1c5a
commit
3fb2bd3362
@ -32,7 +32,9 @@ class SeriesController {
|
|||||||
var limit = (req.query.limit && !isNaN(req.query.limit)) ? Number(req.query.limit) : 25
|
var limit = (req.query.limit && !isNaN(req.query.limit)) ? Number(req.query.limit) : 25
|
||||||
var series = this.db.series.filter(se => se.name.toLowerCase().includes(q))
|
var series = this.db.series.filter(se => se.name.toLowerCase().includes(q))
|
||||||
series = series.slice(0, limit)
|
series = series.slice(0, limit)
|
||||||
res.json(series)
|
res.json({
|
||||||
|
results: series
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
async update(req, res) {
|
async update(req, res) {
|
||||||
|
Loading…
Reference in New Issue
Block a user