Sha256: f978b8676b262a3a3a50dc5b2b62503d9851cb77277b0a6aa3e01d9819dfd4ec
Contents?: true
Size: 1.03 KB
Versions: 4
Compression:
Stored size: 1.03 KB
Contents
require_dependency 'web_console/application_controller' module WebConsole class ConsoleSessionsController < ApplicationController rescue_from ConsoleSession::NotFound do |exception| render json: exception, status: :gone end rescue_from ConsoleSession::Invalid do |exception| render json: exception, status: :unprocessable_entity end def index @console_session = ConsoleSession.create end def input @console_session = ConsoleSession.find(params[:id]) @console_session.send_input(console_session_params[:input]) render nothing: true end def configuration @console_session = ConsoleSession.find(params[:id]) @console_session.configure(console_session_params) render nothing: true end def pending_output @console_session = ConsoleSession.find(params[:id]) render json: { output: @console_session.pending_output } end private def console_session_params params.permit(:input, :width, :height) end end end
Version data entries
4 entries across 4 versions & 2 rubygems