Оно вошло

This commit is contained in:
Игорь Гордеев 2024-06-01 06:32:19 +04:00
parent 73a6b055b9
commit 1c229494df
3 changed files with 5 additions and 6 deletions

View File

@ -57,7 +57,7 @@ namespace ElectronicsShopBusinessLogic.BusinessLogic
return null;
}
_logger.LogInformation($"ReadList.Count:{list.Count}");
return null;
return list;
}

View File

@ -66,11 +66,10 @@ namespace ElectronicsShopRestAPI.Controllers {
_logger.LogError(ex, "Ошибка создания оплаты");
}
}
[HttpPost]
[HttpGet]
public List<PaymeantViewModel>? GetPaymeants(int _clientID) {
try {
return _payLogic.ReadList(new PaymeantSearchModel { ClientID = _clientID });
return _payLogic?.ReadList(new PaymeantSearchModel { ClientID = _clientID });
}
catch (Exception ex) {
_logger.LogError(ex, $"Ошибка получения списка оплат клиента id = {_clientID}");

View File

@ -24,12 +24,12 @@ namespace ElectronicsShopUserApp.Controllers {
//_order = orderLogic;
_productList = new Dictionary<int, (IProductModel, int)>();
}
[HttpGet]
public IActionResult Index() {
if (APIClient.Client == null) {
return Redirect("~/Home/Enter");
}
return View(APIClient.GetRequset<List<PaymeantViewModel>>($"api/client/getpaymeants?_clientid={APIClient.Client.ID}"));
return View(APIClient.GetRequset<List<PaymeantViewModel>>($"api/Client/GetPaymeants?_clientid={APIClient.Client.ID}"));
}
[HttpGet]