This commit is contained in:
2026-03-09 16:30:45 +03:30
parent 8f833b5677
commit 1175a052f7
3 changed files with 1 additions and 140 deletions
@@ -5,7 +5,7 @@ import { FindCataloguesDto } from "../dto/find-catalogues.dto";
export class CatalogueRepository extends EntityRepository<Catalogue> {
async findAllPaginated( opts: FindCataloguesDto = {}): Promise<PaginatedResult<Catalogue>> {
const { page = 1, limit = 10, orderBy = 'order', order = 'asc', isActive } = opts;
const { page = 1, limit = 10, orderBy = 'createdAt', order = 'desc', isActive } = opts;
const offset = (page - 1) * limit;