Broken snippet
async list(page: number, limit: number) {
const [data] = await this.ticketsRepo.findAndCount({
where: { deletedAt: null },
skip: (page - 1) * limit,
take: limit,
});
const total = await this.ticketsRepo.count(); // forgot the deletedAt filter
return { data, meta: { page, limit, total } };
}