Exemplo n.º 1
0
        public async Task <IActionResult> Delete(string email, string name)
        {
            if (email != await GetLoggedUserEmail())
            {
                throw new ServiceException(ErrorCodes.AnimalNotAvailable, "You can only delete animals in your account.");
            }

            await _animalService.DeleteAsync(email, name);

            return(NoContent());
        }