a little re-arranging

This commit is contained in:
Kyle Drake 2013-06-22 19:52:03 -07:00
parent e463968ec5
commit d8f1eb0bb7

8
app.rb
View file

@ -8,6 +8,10 @@ use Rack::Session::Cookie, key: 'neocities',
use Rack::Recaptcha, public_key: $config['recaptcha_public_key'], private_key: $config['recaptcha_private_key']
helpers Rack::Recaptcha::Helpers
before do
redirect '/' if request.post? && !csrf_safe?
end
get '/?' do
dashboard_if_signed_in
slim :index
@ -205,10 +209,6 @@ get '/privacy' do
slim :'privacy'
end
before do
redirect '/' if request.post? && !csrf_safe?
end
def dashboard_if_signed_in
redirect '/dashboard' if signed_in?
end