patched review suggestions and discovered bugs

This commit is contained in:
Laurin
2022-06-07 03:47:37 +02:00
parent 94b2030c8f
commit 7655eebcd9
10 changed files with 259 additions and 221 deletions
+2 -2
View File
@@ -28,7 +28,7 @@ const detailedOrganisation = {
pid: true,
name: true,
date: true,
description: true,
briefDescription: true,
},
},
} as const;
@@ -191,7 +191,7 @@ export const updateOrganisation = async (
});
} catch (e) {
if (e instanceof Prisma.PrismaClientKnownRequestError && e.code === "P2025") {
throw new NotFoundError("discipline", pid);
throw new NotFoundError("organisation", pid);
}
throw e;