Skip to content

Commit

Permalink
chore: rename param
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaDmitrasinovic committed Dec 31, 2024
1 parent 892325d commit 6412467
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ namespace Notes.Application.Entities.Notes.Queries.GetNoteById;

internal class GetNoteByIdHandler(INotesDbContext dbContext) : IQueryHandler<GetNoteByIdQuery, GetNoteByIdResult>
{
public async Task<GetNoteByIdResult> Handle(GetNoteByIdQuery request, CancellationToken cancellationToken)
public async Task<GetNoteByIdResult> Handle(GetNoteByIdQuery query, CancellationToken cancellationToken)
{
var note = await dbContext.Notes
.AsNoTracking()
.SingleOrDefaultAsync(n => n.Id == NoteId.Of(Guid.Parse(request.Id)), cancellationToken);
.SingleOrDefaultAsync(n => n.Id == NoteId.Of(Guid.Parse(query.Id)), cancellationToken);

if (note is null)
throw new NoteNotFoundException(request.Id);
throw new NoteNotFoundException(query.Id);

return new GetNoteByIdResult(note.ToNoteDto());
}
Expand Down

0 comments on commit 6412467

Please sign in to comment.