You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/app/controllers/main_controller.rb

32 lines
875 B

6 years ago
class MainController < ApplicationController
5 years ago
skip_before_action :check_sign
5 years ago
skip_before_action :user_setup
skip_before_action :setup_laboratory
5 years ago
def first_stamp
render :json => { status: 0, message: Time.now.to_i }
end
6 years ago
def index
5 years ago
domain_session = params[:_educoder_session]
if domain_session
5 years ago
uid_logger("main start domain_session is #{domain_session}")
5 years ago
if cookies[:_educoder_session] != domain_session
cookies[:_educoder_session] = nil
cookies[:_educoder_session] = domain_session
end
uid_logger("main start is #{cookies[:_educoder_session]}")
5 years ago
end
5 years ago
5 years ago
if params[:path] && params[:path].split("/").first == "educoderh5"
5 years ago
5 years ago
render file: 'public/h5build/index.html', :layout => false
5 years ago
end
5 years ago
render file: 'public/react/build/index.html', :layout => false
6 years ago
end
end