fix BankRestApi.Controllers

This commit is contained in:
Zakharov_Rostislav 2024-05-17 16:53:47 +04:00
parent 235fdade5c
commit 6a7b0c75d2
3 changed files with 11 additions and 8 deletions

View File

@ -21,11 +21,14 @@ namespace BankRestApi.Controllers
}
[HttpGet]
public List<AccountViewModel>? GetAccountList()
public List<AccountViewModel>? 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

View File

@ -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

View File

@ -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