From 44a98a8312b44a86ba8a7d0b60bd1cb51657b584 Mon Sep 17 00:00:00 2001 From: Flexla54 Date: Thu, 9 Jun 2022 14:22:46 +0000 Subject: [PATCH] [create-pull-request] push formatted files --- src/Controllers/participant.controller.ts | 6 +----- src/Routes/participant.routes.ts | 5 ++++- src/Routes/role_schema.routes.ts | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/Controllers/participant.controller.ts b/src/Controllers/participant.controller.ts index c0df55d..b1960c7 100644 --- a/src/Controllers/participant.controller.ts +++ b/src/Controllers/participant.controller.ts @@ -44,11 +44,7 @@ const returnedParticipant = { }, } as const; -const _getAllParticipants = async ( - res: Response, - req: Request, - teamPid?: string -) => { +const _getAllParticipants = async (res: Response, req: Request, teamPid?: string) => { if (req.teamleader?.isAuthenticated) { await requireLeaderOfTeam(req.teamleader, teamPid); } else if (req.auth?.permission_level == "STANDARD") { diff --git a/src/Routes/participant.routes.ts b/src/Routes/participant.routes.ts index 4ecab8e..7e113db 100644 --- a/src/Routes/participant.routes.ts +++ b/src/Routes/participant.routes.ts @@ -16,7 +16,10 @@ require("express-async-errors"); const router = express.Router(); router.get( - "/", requireConfiguredAuthentication({ optional: false, type: { admin: true, teamleader: true } }), getAllParticipants); + "/", + requireConfiguredAuthentication({ optional: false, type: { admin: true, teamleader: true } }), + getAllParticipants +); teamRouter.get( "/:teamPid/particpants", diff --git a/src/Routes/role_schema.routes.ts b/src/Routes/role_schema.routes.ts index 79d4c83..e2f4b5c 100644 --- a/src/Routes/role_schema.routes.ts +++ b/src/Routes/role_schema.routes.ts @@ -18,7 +18,7 @@ router.get("/:pid", getRoleSchema); router.patch("/:pid", requireConfiguredAuthentication({ optional: false, type: "admin" }), updateRoleSchema); -router.delete("/:pid", requireConfiguredAuthentication({ optional: false, type: "admin" }), deleteRoleSchema) +router.delete("/:pid", requireConfiguredAuthentication({ optional: false, type: "admin" }), deleteRoleSchema); disciplineRouter.get("/:disciplinePid/role-schemas", getAllRoleSchemasWithParam);