@ -3,6 +3,10 @@ class Ecs::HomesController < Ecs::BaseController
@school_managers = current_school.users
end
def first_stamp
render :json => { status: 0, message: Time.now.to_i }
private
def current_school
@ -4,8 +4,4 @@ class MainController < ApplicationController
def index
render file: 'public/react/build/index.html', :layout => false
@ -15,6 +15,7 @@ Rails.application.routes.draw do
scope '/api' do
get 'home/index'
get 'home/search'
get 'home#first_stamp'
get 'search', to: 'searchs#index'
@ -1335,7 +1336,7 @@ Rails.application.routes.draw do
get 'oauth/get_token_callback', to: 'oauth#get_token_callback'
root 'main#index'
get 'main#first_stamp'
## react用
get '*path', to: 'main#index', constraints: ReactConstraint.new