mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-15 18:38:56 +01:00
Fix search query
This commit is contained in:
parent
6c1b4e3a36
commit
6f96b069b5
@ -39,9 +39,11 @@ module.exports = {
|
|||||||
* Search authors
|
* Search authors
|
||||||
* @param {string} libraryId
|
* @param {string} libraryId
|
||||||
* @param {string} query
|
* @param {string} query
|
||||||
|
* @param {number} limit
|
||||||
|
* @param {number} offset
|
||||||
* @returns {object[]} oldAuthor with numBooks
|
* @returns {object[]} oldAuthor with numBooks
|
||||||
*/
|
*/
|
||||||
async search(libraryId, query) {
|
async search(libraryId, query, limit, offset) {
|
||||||
const authors = await Database.authorModel.findAll({
|
const authors = await Database.authorModel.findAll({
|
||||||
where: {
|
where: {
|
||||||
name: {
|
name: {
|
||||||
|
@ -1099,7 +1099,7 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Search authors
|
// Search authors
|
||||||
const authorMatches = await authorFilters.search(oldLibrary.id, query)
|
const authorMatches = await authorFilters.search(oldLibrary.id, query, limit, offset)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
book: itemMatches,
|
book: itemMatches,
|
||||||
|
Loading…
Reference in New Issue
Block a user