Skip to content

Commit

Permalink
Add action for getting brewers of a brewery
Browse files Browse the repository at this point in the history
  • Loading branch information
RieBi committed Jul 25, 2024
1 parent 2c6e8ea commit b4efb52
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Api/Controllers/BreweryController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,13 @@ public async Task<IList<BreweryDto>> All()

return beers;
}

[HttpGet]
[Route("{id}/Brewers")]
public async Task<IList<BrewerDto>?> Brewers(string id)
{
var brewers = await _mediator.Send(new GetAllBrewersInBreweryQuery(id));

return brewers;
}
}

0 comments on commit b4efb52

Please sign in to comment.