Exemplo n.º 1
0
        public async Task <IActionResult> DeleteBeerType(int id)
        {
            var beerType = await _beerTypeService.GetBeerType(id);

            if (beerType == null)
            {
                return(NotFound());
            }

            if (!await _beerTypeService.RemoveBeerType(beerType))
            {
                return(BadRequest("Wystąpił problem podczas usuwania typu piwa"));
            }

            return(Ok());
        }