fix: data ordering

This commit is contained in:
Methapon2001 2024-04-09 08:51:22 +07:00
parent 112bd0eb23
commit 120e2942b8
6 changed files with 8 additions and 0 deletions

View file

@ -51,6 +51,7 @@ export class BranchContactController extends Controller {
) {
const [result, total] = await prisma.$transaction([
prisma.branchContact.findMany({
orderBy: { createdAt: "asc" },
where: { branchId },
take: pageSize,
skip: (page - 1) * pageSize,