Exemple #1
0
        public IActionResult EditOfferStatus(int id, [FromBody] OfferStatusEditDto dto)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            var editStatus = offerService.EditOfferStatus(id, dto).Status;

            switch (editStatus)
            {
            case BasicEditStatus.Ok:
                return(NoContent());

            case BasicEditStatus.BadId:
                return(NotFound());

            default:
                return(StatusCode(500));
            }
        }