fix: wrong instance used

This commit is contained in:
Methapon2001 2024-07-03 09:10:12 +07:00
parent dbf32a987d
commit 500e5a8fbe

View file

@ -39,7 +39,7 @@ async function userBranchCodeGen(branch: Branch, user: User[]) {
update: { value: { increment: 1 } },
});
await prisma.user.update({
await tx.user.update({
where: { id: usr.id },
data: {
code: `${last.key.slice(7)}${last.value.toString().padStart(4, "0")}`,