public async Task <ActionResult <WorkflowSection> > CreateWorkflowSection(Guid projectId, [FromBody] WorkflowSection section)
        {
            var createWorkflowSectionResponse = await _mediator.Send(new CreateWorkflowSectionRequest(projectId, section));

            if (!createWorkflowSectionResponse.Success)
            {
                return(BadRequest(new BadRequestError(createWorkflowSectionResponse.Message)));
            }

            return(createWorkflowSectionResponse.Value);
        }
Exemplo n.º 2
0
 public async Task <WorkflowSection> UpsertWorkflowSection(Guid projectId, Guid sectionId, WorkflowSection section)
 {
     using (var request = new HttpRequestMessage(HttpMethod.Put, $"/config/projects/{projectId}/sections/{sectionId}"))
     {
         return(await PostPutRequestWithResponse <WorkflowSection, WorkflowSection>(request, section));
     }
 }