Ejemplo n.º 1
0
        public async Task <IActionResult> Update(DeliveryPutCompleteRequest model)
        {
            try
            {
                if (!ModelState.IsValid)
                {
                    throw new Exception("Petición de actualización inválida");
                }

                return(Ok(await _deliveryService.CompleteAsync(model, _apiDbContext)));
            }
            catch (Exception e)
            {
                return(StatusCode(500, e.Message));
            }
        }