lib/sabisu/server.rb in sabisu-0.1.0 vs lib/sabisu/server.rb in sabisu-0.1.1
- old
+ new
@@ -1,7 +1,7 @@
gem 'thin'
-gem 'sinatra', '1.4.4'
+gem 'sinatra', '~> 1.4.4'
# load gems
require 'sinatra'
require 'sinatra/base'
require 'sinatra/multi_route'
@@ -39,10 +39,14 @@
before '/api/*' do
protected!
end
get '/' do
- redirect '/login'
+ if logged_in?
+ redirect '/events'
+ else
+ redirect '/login'
+ end
end
get '/login' do
if logged_in?
redirect '/events'