From 856a461960032563ee2821c806f83944fc9d1dd4 Mon Sep 17 00:00:00 2001 From: Eric <36512385+PhucNghi176@users.noreply.github.com> Date: Fri, 25 Oct 2024 15:51:59 +0700 Subject: [PATCH] Update CreateScheduleCommandHandler.cs --- .../Commands/Schedules/CreateScheduleCommandHandler.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MBS_COMMAND.Application/UserCases/Commands/Schedules/CreateScheduleCommandHandler.cs b/MBS_COMMAND.Application/UserCases/Commands/Schedules/CreateScheduleCommandHandler.cs index e6fbb60..1ef9734 100644 --- a/MBS_COMMAND.Application/UserCases/Commands/Schedules/CreateScheduleCommandHandler.cs +++ b/MBS_COMMAND.Application/UserCases/Commands/Schedules/CreateScheduleCommandHandler.cs @@ -33,7 +33,7 @@ public async Task Handle(Command.CreateScheduleCommand request, Cancella return Result.Failure(new Error("400", "User is not exist !")); } - var group = await _groupRepository.FindSingleAsync(x => x.LeaderId.Equals(user.Id), cancellationToken); + var group = await _groupRepository.FindSingleAsync(x => x.LeaderId.Equals(user.Id) && x.ProjectId.Equals(request.ProjectId), cancellationToken); if (group == null || group.IsDeleted) { @@ -86,4 +86,4 @@ public async Task Handle(Command.CreateScheduleCommand request, Cancella return Result.Success("Booking Schedule Successfully !"); } -} \ No newline at end of file +}