Fix Series Sort

This commit is contained in:
Igor Kaldowski 2021-12-04 22:10:26 +00:00
parent 670a461752
commit 60aeb23797

View File

@ -179,7 +179,7 @@ class LibraryController {
series = series.slice(startIndex, startIndex + payload.limit)
}
payload.results = series
payload.results = sort(series).asc(s => s.name)
res.json(payload)
}
@ -194,7 +194,7 @@ class LibraryController {
return res.status(404).send('Series not found')
}
audiobooks = sort(audiobooks).asc(ab => {
return ab.book.volumeNumber
return Number(ab.book.volumeNumber)
})
res.json({
results: audiobooks.map(ab => ab.toJSONExpanded()),