mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
a little re-arranging
This commit is contained in:
parent
e463968ec5
commit
d8f1eb0bb7
1 changed files with 4 additions and 4 deletions
8
app.rb
8
app.rb
|
@ -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']
|
use Rack::Recaptcha, public_key: $config['recaptcha_public_key'], private_key: $config['recaptcha_private_key']
|
||||||
helpers Rack::Recaptcha::Helpers
|
helpers Rack::Recaptcha::Helpers
|
||||||
|
|
||||||
|
before do
|
||||||
|
redirect '/' if request.post? && !csrf_safe?
|
||||||
|
end
|
||||||
|
|
||||||
get '/?' do
|
get '/?' do
|
||||||
dashboard_if_signed_in
|
dashboard_if_signed_in
|
||||||
slim :index
|
slim :index
|
||||||
|
@ -205,10 +209,6 @@ get '/privacy' do
|
||||||
slim :'privacy'
|
slim :'privacy'
|
||||||
end
|
end
|
||||||
|
|
||||||
before do
|
|
||||||
redirect '/' if request.post? && !csrf_safe?
|
|
||||||
end
|
|
||||||
|
|
||||||
def dashboard_if_signed_in
|
def dashboard_if_signed_in
|
||||||
redirect '/dashboard' if signed_in?
|
redirect '/dashboard' if signed_in?
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue