mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-07-16 17:47:22 +00:00
code style cleanup
This commit is contained in:
@@ -3,6 +3,6 @@ using MediatR;
|
||||
namespace Features.Breweries.Commands.DeleteBrewery;
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a brewery post by its unique identifier.
|
||||
/// Deletes a brewery post by its unique identifier.
|
||||
/// </summary>
|
||||
public record DeleteBreweryCommand(Guid BreweryPostId) : IRequest;
|
||||
public record DeleteBreweryCommand(Guid BreweryPostId) : IRequest;
|
||||
@@ -4,12 +4,14 @@ using MediatR;
|
||||
namespace Features.Breweries.Commands.DeleteBrewery;
|
||||
|
||||
/// <summary>
|
||||
/// Handles <see cref="DeleteBreweryCommand"/> by deleting the matching brewery post.
|
||||
/// Handles <see cref="DeleteBreweryCommand" /> by deleting the matching brewery post.
|
||||
/// </summary>
|
||||
/// <param name="repository">Repository used to delete the brewery post.</param>
|
||||
public class DeleteBreweryHandler(IBreweryRepository repository)
|
||||
: IRequestHandler<DeleteBreweryCommand>
|
||||
{
|
||||
public Task Handle(DeleteBreweryCommand request, CancellationToken cancellationToken) =>
|
||||
repository.DeleteAsync(request.BreweryPostId);
|
||||
}
|
||||
public Task Handle(DeleteBreweryCommand request, CancellationToken cancellationToken)
|
||||
{
|
||||
return repository.DeleteAsync(request.BreweryPostId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user