From dbf32a987d9af7b8673835270b4fc7b43db19b19 Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Tue, 2 Jul 2024 17:57:14 +0700 Subject: [PATCH] fix: wrong relation included --- src/controllers/branch-controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/branch-controller.ts b/src/controllers/branch-controller.ts index 9023411..5c4f7a7 100644 --- a/src/controllers/branch-controller.ts +++ b/src/controllers/branch-controller.ts @@ -402,7 +402,7 @@ export class BranchController extends Controller { const branch = await prisma.branch.findUnique({ include: { - user: { where: { id: req.user.sub } }, + user: { where: { userId: req.user.sub } }, }, where: { id: branchId }, });