/// <inheritdoc /> public async Task <SshOperationResult> ExecuteCommand(ExecuteCommandModel model, CancellationToken token = default) => await PostAsync <ExecuteCommandModel, SshOperationResult>(UrlConstants.SshTerminal + "/execute", model, token);
/// <summary> /// Initializes a new instance of the <see cref="ExecuteShellCommand"/> class. /// </summary> /// <param name="model">The model.</param> public ExecuteShellCommand(ExecuteCommandModel model) { Model = model; }
public async Task <IActionResult> ExecuteCommand( [FromBody] ExecuteCommandModel model, CancellationToken token) => Ok(await _mediator.Send(new ExecuteShellCommand(model), token));