コード例 #1
0
ファイル: PriceController.cs プロジェクト: M4ntha5/kika-group
        public async Task <IActionResult> Get(string sku)
        {
            if (string.IsNullOrEmpty(sku))
            {
                throw new Exception("Sku no defined");
            }

            var prices = await _priceService.GetAllItemPrices(sku);

            if (prices == null || prices.Count < 1)
            {
                throw new Exception("No prices found for this sku");
            }

            return(Ok(prices));
        }