[create-pull-request] push formatted files

This commit is contained in:
Flexla54
2022-06-09 16:23:54 +02:00
committed by La_Felx
parent 418a26b3dd
commit 44a98a8312
3 changed files with 6 additions and 7 deletions
+1 -5
View File
@@ -44,11 +44,7 @@ const returnedParticipant = {
}, },
} as const; } as const;
const _getAllParticipants = async ( const _getAllParticipants = async (res: Response, req: Request, teamPid?: string) => {
res: Response,
req: Request,
teamPid?: string
) => {
if (req.teamleader?.isAuthenticated) { if (req.teamleader?.isAuthenticated) {
await requireLeaderOfTeam(req.teamleader, teamPid); await requireLeaderOfTeam(req.teamleader, teamPid);
} else if (req.auth?.permission_level == "STANDARD") { } else if (req.auth?.permission_level == "STANDARD") {
+4 -1
View File
@@ -16,7 +16,10 @@ require("express-async-errors");
const router = express.Router(); const router = express.Router();
router.get( router.get(
"/", requireConfiguredAuthentication({ optional: false, type: { admin: true, teamleader: true } }), getAllParticipants); "/",
requireConfiguredAuthentication({ optional: false, type: { admin: true, teamleader: true } }),
getAllParticipants
);
teamRouter.get( teamRouter.get(
"/:teamPid/particpants", "/:teamPid/particpants",
+1 -1
View File
@@ -18,7 +18,7 @@ router.get("/:pid", getRoleSchema);
router.patch("/:pid", requireConfiguredAuthentication({ optional: false, type: "admin" }), updateRoleSchema); 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); disciplineRouter.get("/:disciplinePid/role-schemas", getAllRoleSchemasWithParam);