Beispiel #1
0
        public async Task <ActionResult <OfferDto> > GetOffer(ulong id)
        {
            try
            {
                OfferDto offerDto = await _business.GetOffer(id);

                if (offerDto == null)
                {
                    return(NotFound($"An offer with id \"{id}\" was not found."));
                }

                return(Ok(offerDto));
            }
            catch (ConditionFailedException exception)
            {
                return(BadRequest(exception.Message));
            }
        }