public async Task Post([FromBody] Contracts.ThirdPartyRate value)
        {
            var thirdPartyRate = await command.SaveAsync
                                 (
                new ThirdPartyRate
            {
                BaseCurrency  = value.BaseCurrency,
                TradeCurrency = value.TradeCurrency,
                Rate          = value.Rate,
                ReferenceId   = value.PartnerId
            }
                                 );

            await sender.SendAsync(new Contracts.CreateQuote
            {
                Id            = thirdPartyRate.Id,
                BaseCurrency  = thirdPartyRate.BaseCurrency,
                TradeCurrency = thirdPartyRate.TradeCurrency,
                Rate          = thirdPartyRate.Rate,
            });
        }
Esempio n. 2
0
 public IActionResult SendMessage([FromRoute] string username, [FromBody] string message)
 {
     sendMessage.SendAsync(username, message);
     return(Ok());
 }