From cba729f48210a63482526568e4cf24ecb07817fd Mon Sep 17 00:00:00 2001 From: xxq250 Date: Mon, 17 Apr 2023 10:27:50 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=8A=A8=E6=80=81=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/commit_logs_controller.rb | 9 --------- config/routes.rb | 1 + 2 files changed, 1 insertion(+), 9 deletions(-) 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'