save matches to db

This commit is contained in:
Kalle (Sendou)
2021-02-07 00:29:20 +02:00
parent 0fabe28e1c
commit 3f0b704e9d

View File

@@ -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) {