class GithubApp < Sinatra::Base
before do
@site = Site.first
end
get '/site/update' do
updated = system('git pull')
@site.update_attribute(:up_to_date, true) if updated
redirect "admin/sites?updated=#{updated}"