From 3f0b704e9daa9368600dac52fe64cbc523c8a0d0 Mon Sep 17 00:00:00 2001 From: "Kalle (Sendou)" <38327916+Sendouc@users.noreply.github.com> Date: Sun, 7 Feb 2021 00:29:20 +0200 Subject: [PATCH] save matches to db --- pages/api/play/matches.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pages/api/play/matches.ts b/pages/api/play/matches.ts index 436829f74..b1f5a3711 100644 --- a/pages/api/play/matches.ts +++ b/pages/api/play/matches.ts @@ -169,7 +169,11 @@ async function postHandler(req: NextApiRequest, res: NextApiResponse) { }) ); - // await prisma.$transaction([updateLadderMatch, ...updateWinners, ...updateLosers] as any); + await prisma.$transaction([ + updateLadderMatch, + ...updateWinners, + ...updateLosers, + ] as any); res.status(200).end(); } catch (e) { if (e instanceof z.ZodError) {