Ejemplo n.º 1
0
        public async Task <IActionResult> AddOrderEditsAsync(string id, [FromForm] OrderEditFormDTO item)
        {
            id          = _idHelper.CutFirstTwoNumbers(id);
            item.Images = Request.Form.Files;
            if (!_orderSrv.IsOrderExistById(id))
            {
                return(NotFound("Order not found"));
            }

            var result = await _orderSrv.EditOrder(id, item);

            if (result.Success)
            {
                return(Ok(result));
            }

            return(BadRequest(result));
        }