Skip to content

Commit

Permalink
fix create MentorGroup
Browse files Browse the repository at this point in the history
  • Loading branch information
paulhollmann committed Mar 10, 2024
1 parent 0201d9a commit ea880a3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/controllers/mentor-group/MentorGroupAdminController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,15 @@ async function create(request: Request, response: Response, next: NextFunction)
try {
const body = request.body as { name: string; users: any; fir?: "edww" | "edgg" | "edmm" };

console.log(body)

Validator.validate(body, {
name: [ValidationTypeEnum.NON_NULL],
fir: [ValidationTypeEnum.NON_NULL],
//fir: [ValidationTypeEnum.NON_NULL],
users: [ValidationTypeEnum.NON_NULL, ValidationTypeEnum.VALID_JSON],
});

const mentorGroup = await MentorGroup.create({
name: body.name,
fir: body.fir,
fir: body.fir == "" ? null : body.fir,
});

if (mentorGroup == null) {
Expand Down

0 comments on commit ea880a3

Please sign in to comment.