public async Task <IActionResult> Transfer(NewTransferCommand transferCommand) { var token = this.Request.Headers["Authorization"].ToString().Substring("Bearer ".Length); await _Bus.SendAsync(Queues.Frontend.Commands, token, transferCommand); CommandStatus status = CommandStatus.Queue(transferCommand.Id); await _Hub.Clients.All.SendAsync(transferCommand.Id.ToString(), status); return(StatusCode(StatusCodes.Status202Accepted)); }
public async Task <IActionResult> Index(CreateInstrumentCommand createInstrument) { var token = this.Request.Headers["Authorization"].ToString().Substring("Bearer ".Length); await _Bus.SendAsync(Queues.Frontend.Commands, token, createInstrument); CommandStatus status = CommandStatus.Queue(createInstrument.Id); await _Hub.Clients.All.SendAsync(createInstrument.Id.ToString(), status); return(Ok()); }