Example #1
0
        public async Task <IActionResult> UpdateStock(int productId, int quantity)
        {
            bool isSuccess = await _manageProductService.UpdateStock(productId, quantity);

            if (isSuccess == true)
            {
                return(Ok());
            }
            return(BadRequest());
        }
        public async Task <IActionResult> UpdateStock([FromForm] int id, [FromForm] int addedQuantity)
        {
            var result = await _manageProduct.UpdateStock(id, addedQuantity);

            return(new OkObjectResult(result));
        }