Ejemplo n.º 1
0
        public async Task <BuyCurrencyCommand> Map(BuyCurrencyCommandDto source)
        {
            var command = await transactionCommandMapper.Map <BuyCurrencyCommand>(source);

            command.UserMoneyCosts = cantorCostsCalculator.CountUserCostsInPln(command.Currency, source.Amount);
            return(command);
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> BuyCurrency([FromBody] BuyCurrencyCommandDto command)
        {
            var response = await mediator.Send(command);

            return(Ok(response));
        }