Exemplo n.º 1
0
        public ActionResult <Guid> AddItem([FromBody] Product product, int amount, Operation operation)
        {
            try
            {
                var result = _stockServices.ChangeStock(product, amount, operation);

                return(Ok(new { result = result }));
            }
            catch (Exception exception)
            {
                _logger.LogError(exception, exception.Message);
                return(new StatusCodeResult(500));
            }
        }