using Features.Breweries.Repository;
using MediatR;
namespace Features.Breweries.Commands.DeleteBrewery;
///
/// Handles by deleting the matching brewery post.
///
/// Repository used to delete the brewery post.
public class DeleteBreweryHandler(IBreweryRepository repository)
: IRequestHandler
{
public Task Handle(DeleteBreweryCommand request, CancellationToken cancellationToken) =>
repository.DeleteAsync(request.BreweryPostId);
}