Module: RiderServer::Ops

Defined in:
lib/rider_server/operations/clone.rb,
lib/rider_server/operations/close.rb

Constant Summary collapse

Close =
Operation.define do
  name "close"
  documentation "Close a specific session."

  argument :id, :string, "The request id", required: true
  argument :session, :string, "The session to close", required: true

  # Handle the close operation, session will be nil
  def handle(controller, operation)
    response = Response.new(operation)

    session_id = operation["session"]

    controller.delete_session(session_id)

    response.status("done")
    response
  end
end