Ejemplo n.º 1
0
 public async Task <ActionResult> Debug([FromBody] AgentDebugDto agentDebugDto, CancellationToken cancellationToken)
 {
     try
     {
         return(Ok(await this.agentService.DebugAsync(agentDebugDto.TerminalOutput, agentDebugDto.Script, cancellationToken)));
     }
     catch (Exception ex)
     {
         return(Ok(ex.Message));
     }
 }
Ejemplo n.º 2
0
        public async Task <ActionResult> Debug([FromBody] AgentDebugDto agentDebugDto, CancellationToken cancellationToken)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            try
            {
                var scriptOutput = await this.agentService.DebugAsync(agentDebugDto.Script, agentDebugDto.TerminalOutput, cancellationToken);

                return(Ok(scriptOutput));
            }
            catch (Exception ex)
            {
                return(Ok(ex.Message));
            }
        }