mirror of
https://github.com/detleph/server.git
synced 2026-09-04 08:36:06 +02:00
[create-pull-request] push formatted files
This commit is contained in:
@@ -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") {
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user