예제 #1
0
        public async Task <IActionResult> CreateAgentTypeFormAccount([FromBody] CreateAgentTypeFormAccountCommand createAgentTypeFormAccount)
        {
            var result = await mediator.Send(createAgentTypeFormAccount);

            return(result ?
                   (IActionResult)Ok(result) :
                   (IActionResult)BadRequest());
        }
예제 #2
0
        public async Task <bool> Handle(CreateAgentTypeFormAccountCommand createAgentTypeFormAccount, CancellationToken cancellationToken)
        {
            //var agent = await queryExecutor.Execute<GetAgentQuery, Agent>(new GetAgentQuery() { AgentId = createAgentTypeFormAccount.AggregateId });

            //request to type form for a url
            //create a spreadsheet
            //map typeform and spreadsheet through zap

            //agent.AgentTypeForm = new AgentTypeForm { SpreadsheetUrl = "asdxawd", Type = 1, TypeFormUrl = await CreateTypeformUrl(agent) };

            //await agentRepository.UpdateTypeFormAsync(agent);

            return(true);
        }