예제 #1
0
        public async Task <IActionResult> CreateCheque([FromBody] ChequeAggregate chequeDto)
        {
            var cheque        = new Cheque().CreateFromDto(chequeDto);
            var chequeId      = _chequeRepository.Create(cheque);
            var updatedCheque = await _chequeRepository.AddCost(chequeId);

            _copterRepository.UpdateStatus(cheque.Rent.CopterId);
            //await _hub.FinishUsingCopterAsync(updatedCheque);
            var attachment = _reportRenderer.Render(cheque);

            //await _mailBox.Send(attachment);

            return(Ok($"Check with ID: {cheque.Id} successfully created"));
        }