Skip to content

Commit

Permalink
Remove any default limits for categories
Browse files Browse the repository at this point in the history
  • Loading branch information
risjai committed Oct 30, 2024
1 parent 6094830 commit 4c751cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ module.exports = {
'category.category_id'
);
query.where('category.parent_id', '=', category.categoryId);
// Remove any default limit to show all children
query.limit(0);
const results = await query.execute(pool);
return results.map((row) => camelCase(row));
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ class CategoryCollection {
constructor(baseQuery) {
this.baseQuery = baseQuery;
this.baseQuery.orderBy('category.category_id', 'DESC');
// Remove default limit to show all categories
this.baseQuery.limit(0);
}

async init(filters = [], isAdmin = false) {
Expand Down

0 comments on commit 4c751cb

Please sign in to comment.