Skip to content

Commit

Permalink
Updated CreateDialogCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
Fargekritt committed Feb 3, 2025
1 parent cd41fab commit d4cc03e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ public async Task<CreateDialogResult> Handle(CreateDialogCommand request, Cancel
})
{
var dialogId = await _db.Dialogs
.Where(x => x.IdempotentKey == request.IdempotentKey && x.Org == dialog.Org)
.Where(x => x.IdempotentKey == request.Dto.IdempotentKey && x.Org == dialog.Org)
.Select(x => x.Id)
.FirstOrDefaultAsync(cancellationToken);

return new Conflict(new ConflictError(nameof(request.IdempotentKey), $"'{request.IdempotentKey}' already exists with DialogId '{dialogId}'"));
return new Conflict(new ConflictError(nameof(request.Dto.IdempotentKey), $"'{request.Dto.IdempotentKey}' already exists with DialogId '{dialogId}'"));
}

return saveResult.Match<CreateDialogResult>(
Expand Down

0 comments on commit d4cc03e

Please sign in to comment.