@@ -21,7 +21,7 @@ export class ProductRepository extends EntityRepository<Product> {
|
||||
}
|
||||
|
||||
async findAllPaginated(opts: FindproductsOpts = {}): Promise<PaginatedResult<Product>> {
|
||||
const { page = 1, limit = 10, search, orderBy = 'createdAt', order = 'desc', categoryId, isActive } = opts;
|
||||
const { page = 1, limit = 10, search, orderBy = 'order', order = 'asc', categoryId, isActive } = opts;
|
||||
|
||||
const offset = (page - 1) * limit;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user