From 788fa96b14a44bccc6c7eeb75da79efe2bb4b49c Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 6 Jul 2017 16:13:46 +0800 Subject: [PATCH] wenssh --- app/controllers/myshixuns_controller.rb | 3 ++- app/views/games/_game_webssh.html.erb | 3 +++ app/views/games/_repository.html.erb | 30 ++++++++++++++++++------- 3 files changed, 27 insertions(+), 9 deletions(-) create mode 100644 app/views/games/_game_webssh.html.erb diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb index 7135bc401..a915daf6d 100644 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -34,7 +34,8 @@ class MyshixunsController < ApplicationController render :json => {:host => res['address'], :port => res['port'], :username => username, :password => password} rescue Exception => e logger.error(e) - @message = e.try(:message) + render :json => {:error => e.try(:message)} + # @message = e.try(:message) end end diff --git a/app/views/games/_game_webssh.html.erb b/app/views/games/_game_webssh.html.erb new file mode 100644 index 000000000..c9ea3c760 --- /dev/null +++ b/app/views/games/_game_webssh.html.erb @@ -0,0 +1,3 @@ + diff --git a/app/views/games/_repository.html.erb b/app/views/games/_repository.html.erb index ad68a64c1..f65c57111 100644 --- a/app/views/games/_repository.html.erb +++ b/app/views/games/_repository.html.erb @@ -2,7 +2,7 @@