small fixes

This commit is contained in:
Laurin
2022-06-05 21:08:22 +02:00
parent 1d2794c75c
commit d0a1d4a2f1
3 changed files with 29 additions and 19 deletions
+2 -1
View File
@@ -85,9 +85,10 @@ export const updateTeam = async (req: Request, res: Response) => {
discipline: { connect: { pid: body.disciplineId } },
leaderEmail: body.leaderEmail,
},
select: basicTeam,
});
res.status(204).json({ type: "success", payload: { team } });
res.status(200).json({ type: "success", payload: { team } });
} catch (e) {
if (e instanceof Prisma.PrismaClientKnownRequestError && e.code === "P2025") {
throw new NotFoundError("team", pid);