Skip to content

Commit

Permalink
fix: pagination args in fts queries
Browse files Browse the repository at this point in the history
  • Loading branch information
mkeen committed Jan 5, 2022
1 parent ccb6d34 commit da3370f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/models/projects/projects.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,8 @@ class Project extends Model {
count,
rows: await sequelize.query(sql, {
model: Project,
replacements: { search: searchStr, orgUid },
replacements: { search: searchStr, orgUid, offset, limit },
mapToModel: true, // pass true here if you have any mapped fields
offset,
limit,
}),
};
}
Expand All @@ -105,10 +103,8 @@ class Project extends Model {

return sequelize.query(sql, {
model: Project,
replacements: { search: `${searchStr}*`, orgUid },
replacements: { search: `${searchStr}*`, orgUid, offset, limit },
mapToModel: true, // pass true here if you have any mapped fields
offset,
limit,
});
}
}
Expand Down

0 comments on commit da3370f

Please sign in to comment.