public async Task <BuyCurrencyCommand> Map(BuyCurrencyCommandDto source) { var command = await transactionCommandMapper.Map <BuyCurrencyCommand>(source); command.UserMoneyCosts = cantorCostsCalculator.CountUserCostsInPln(command.Currency, source.Amount); return(command); }
public async Task <IActionResult> BuyCurrency([FromBody] BuyCurrencyCommandDto command) { var response = await mediator.Send(command); return(Ok(response)); }