diff --git a/app/controllers/commit_logs_controller.rb b/app/controllers/commit_logs_controller.rb index 7c0828b6b..b034f673c 100644 --- a/app/controllers/commit_logs_controller.rb +++ b/app/controllers/commit_logs_controller.rb @@ -28,13 +28,4 @@ class CommitLogsController < ApplicationController end end - - def activity - commit_sql = CommitLog.select("user_id,project_id, '' as ref").order(id: :desc).limit(10).to_sql - project_sql = Project.select("user_id,id as project_id, '' as ref").order(id: :desc).limit(10).to_sql - project_sql = Issue.select("user_id,project_id, '' as ref").order(id: :desc).limit(10).to_sql - project_sql = Issue.select("user_id,project_id, '' as ref").order(id: :desc).limit(10).to_sql - privacy_organizations_sql = Project.with_visibility("privacy").joins(:organization_users).where(organization_users: {user_id: current_user.id}).to_sql - @organizations = Organization.from("( #{ logged_organizations_sql } UNION #{ privacy_organizations_sql } ) AS users") - end end diff --git a/config/routes.rb b/config/routes.rb index 8b943f543..36f056c2a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1074,6 +1074,7 @@ Rails.application.routes.draw do get 'oauth/get_token_callback', to: 'oauth#get_token_callback' resources :commit_logs, :only => [:create] + get 'activity/last', to: 'project_trends#last' scope '/app' do get '/', to: 'installations#app'