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