Merge branch 'master' of github.com:kyledrake/neocities-web

This commit is contained in:
Kyle Drake 2013-07-15 06:45:36 +02:00
commit 6d345ddc5f
2 changed files with 13 additions and 2 deletions

4
app.rb
View file

@ -279,7 +279,7 @@ post '/site_files/upload' do
current_site.update site_changed: true
end
current_site.update updated_at: Time.now
current_site.update changed_count: 1+current_site.changed_count, updated_at: Time.now
flash[:success] = "Successfully uploaded file #{sanitized_filename}."
redirect '/dashboard'
@ -349,7 +349,7 @@ post '/site_files/save/:filename' do |filename|
current_site.update site_changed: true
end
current_site.update updated_at: Time.now
current_site.update changed_count: 1+current_site.changed_count, updated_at: Time.now
'ok'
end

View file

@ -0,0 +1,11 @@
Sequel.migration do
up {
DB.add_column :sites, :changed_count, :integer, default: 0
DB.add_index :sites, :changed_count
}
down {
DB.drop_column :sites, :changed_count
DB.drop_index :sites, :changed_count
}
end