Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
PhucNghi176 committed Nov 7, 2024
1 parent ae6c685 commit fb4cd01
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ public async Task<Result> Handle(Command.CreateScheduleCommand request, Cancella
return Result.Failure(new Error("500", "Your group must have at least 3 members !"));
}

if (group.Project is null)
{
return Result.Failure(new Error("500", "Your group don't have a project. !"));
}
if(group.MentorId==user.Id)
{
return Result.Failure(new Error("500", "Cannot book your group mentor's slot !"));
}
var slot = await slotRepository.FindByIdAsync(request.SlotId, cancellationToken);

if (slot == null || group.IsDeleted)
Expand Down

0 comments on commit fb4cd01

Please sign in to comment.