From 6a7b0c75d26dcb9269eebfa57cf586bb8b3240f2 Mon Sep 17 00:00:00 2001 From: Zakharov_Rostislav Date: Fri, 17 May 2024 16:53:47 +0400 Subject: [PATCH] fix BankRestApi.Controllers --- Bank/BankRestApi/Controllers/AccountController.cs | 11 +++++++---- Bank/BankRestApi/Controllers/TransferController.cs | 4 ++-- Bank/BankRestApi/Controllers/WithdrawalController.cs | 4 ++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Bank/BankRestApi/Controllers/AccountController.cs b/Bank/BankRestApi/Controllers/AccountController.cs index 1b7b230..89cbbbc 100644 --- a/Bank/BankRestApi/Controllers/AccountController.cs +++ b/Bank/BankRestApi/Controllers/AccountController.cs @@ -21,11 +21,14 @@ namespace BankRestApi.Controllers } [HttpGet] - public List? GetAccountList() + public List? GetAccountList(int managerId) { try { - return _logic.ReadList(null); + return _logic.ReadList(new AccountSearchModel + { + ManagerId = managerId, + }); } catch (Exception ex) { @@ -65,7 +68,7 @@ namespace BankRestApi.Controllers } } - [HttpPut] + [HttpPost] public void UpdateAccount(AccountBindingModel model) { try @@ -79,7 +82,7 @@ namespace BankRestApi.Controllers } } - [HttpDelete] + [HttpPost] public void DeleteAccount(AccountBindingModel model) { try diff --git a/Bank/BankRestApi/Controllers/TransferController.cs b/Bank/BankRestApi/Controllers/TransferController.cs index ff6a4a6..f0098cf 100644 --- a/Bank/BankRestApi/Controllers/TransferController.cs +++ b/Bank/BankRestApi/Controllers/TransferController.cs @@ -64,7 +64,7 @@ namespace BankRestApi.Controllers } } - [HttpPut] + [HttpPost] public void UpdateTransfer(TransferBindingModel model) { try @@ -78,7 +78,7 @@ namespace BankRestApi.Controllers } } - [HttpDelete] + [HttpPost] public void DeleteTransfer(TransferBindingModel model) { try diff --git a/Bank/BankRestApi/Controllers/WithdrawalController.cs b/Bank/BankRestApi/Controllers/WithdrawalController.cs index 30855f7..8cab52b 100644 --- a/Bank/BankRestApi/Controllers/WithdrawalController.cs +++ b/Bank/BankRestApi/Controllers/WithdrawalController.cs @@ -64,7 +64,7 @@ namespace BankRestApi.Controllers } } - [HttpPut] + [HttpPost] public void UpdateWithdrawal(WithdrawalBindingModel model) { try @@ -78,7 +78,7 @@ namespace BankRestApi.Controllers } } - [HttpDelete] + [HttpPost] public void DeleteWithdrawal(WithdrawalBindingModel model) { try