Exemple #1
0
        public async Task <ActionResult <BidResponse> > PostAsync([FromBody] BidRequestDto bidRequestDto)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState.GetErrorMessages()));
            }

            var bidResponse = await _bidService.Place(bidRequestDto);

            if (!bidResponse.Success)
            {
                return(BadRequest(bidResponse.Message));
            }

            return(Ok(bidResponse));
        }