Fix search query

This commit is contained in:
advplyr 2023-08-21 16:33:16 -05:00
parent 6c1b4e3a36
commit 6f96b069b5
2 changed files with 4 additions and 2 deletions

View File

@ -39,9 +39,11 @@ module.exports = {
* Search authors
* @param {string} libraryId
* @param {string} query
* @param {number} limit
* @param {number} offset
* @returns {object[]} oldAuthor with numBooks
*/
async search(libraryId, query) {
async search(libraryId, query, limit, offset) {
const authors = await Database.authorModel.findAll({
where: {
name: {

View File

@ -1099,7 +1099,7 @@ module.exports = {
}
// Search authors
const authorMatches = await authorFilters.search(oldLibrary.id, query)
const authorMatches = await authorFilters.search(oldLibrary.id, query, limit, offset)
return {
book: itemMatches,