Merge branch 'main' of http://student.git.athene.tech/shadowik/CourseWork_BankYouBankrupt
This commit is contained in:
commit
b8aafc7cc5
@ -18,11 +18,14 @@ namespace BankYouBankruptRestApi.Controllers
|
||||
|
||||
private readonly IDebitingLogic _debitingLogic;
|
||||
|
||||
public CardController(ICardLogic cardLogic, IDebitingLogic debitingLogic, ILogger<ClientController> logger)
|
||||
private readonly ICreditingLogic _creditingLogic;
|
||||
|
||||
public CardController(ICardLogic cardLogic, IDebitingLogic debitingLogic, ICreditingLogic creditingLogic, ILogger<ClientController> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
_cardLogic = cardLogic;
|
||||
_debitingLogic = debitingLogic;
|
||||
_creditingLogic = creditingLogic;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
@ -61,7 +64,18 @@ namespace BankYouBankruptRestApi.Controllers
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка создания на снятие наличных");
|
||||
_logger.LogError(ex, "Ошибка создания запроса на снятие наличных");
|
||||
Response.StatusCode = (int)HttpStatusCode.NotAcceptable;
|
||||
}
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public void CreateCreditingOperation(CreditingBindingModel model) {
|
||||
try {
|
||||
_creditingLogic.Create(model);
|
||||
}
|
||||
catch (Exception ex) {
|
||||
_logger.LogError(ex, "Ошибка создания операции на пополнение");
|
||||
Response.StatusCode = (int)HttpStatusCode.NotAcceptable;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user