diff options
Diffstat (limited to 'app/controllers/sys_controller.rb')
-rw-r--r-- | app/controllers/sys_controller.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/app/controllers/sys_controller.rb b/app/controllers/sys_controller.rb index da4b119a7..5e74192a9 100644 --- a/app/controllers/sys_controller.rb +++ b/app/controllers/sys_controller.rb @@ -37,6 +37,23 @@ class SysController < ActionController::Base end end end + + def fetch_changesets + projects = [] + if params[:id] + projects << Project.active.has_module(:repository).find(params[:id]) + else + projects = Project.active.has_module(:repository).find(:all, :include => :repository) + end + projects.each do |project| + if project.repository + project.repository.fetch_changesets + end + end + render :nothing => true, :status => 200 + rescue ActiveRecord::RecordNotFound + render :nothing => true, :status => 404 + end protected |