mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
create disabled check to post, minfraud
This commit is contained in:
parent
7b9107393b
commit
0d8684704f
2 changed files with 6 additions and 1 deletions
|
@ -91,6 +91,11 @@ post '/create' do
|
|||
return {result: 'error'}.to_json
|
||||
end
|
||||
|
||||
if defined?(BlackBox.create_disabled?) && BlackBox.create_disabled?(site, request)
|
||||
flash[:error] = 'Site creation is currently unavailable, please try again later.'
|
||||
return {result: 'error'}.to_json
|
||||
end
|
||||
|
||||
if !@site.valid?
|
||||
flash[:error] = @site.errors.first.last.first
|
||||
return {result: 'error'}.to_json
|
||||
|
|
|
@ -80,7 +80,7 @@ get '/?' do
|
|||
@blog_feed_html = SimpleCache.get :blog_feed_html
|
||||
end
|
||||
|
||||
@create_disabled = defined?(BlackBox.create_disabled?) && BlackBox.create_disabled?(request)
|
||||
@create_disabled = false
|
||||
|
||||
erb :index, layout: :index_layout
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue