项目动态接口

This commit is contained in:
xxq250 2023-04-17 10:27:50 +08:00
parent 2175e798e1
commit cba729f482
2 changed files with 1 additions and 9 deletions

View File

@ -28,13 +28,4 @@ class CommitLogsController < ApplicationController
end end
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 end

View File

@ -1074,6 +1074,7 @@ Rails.application.routes.draw do
get 'oauth/get_token_callback', to: 'oauth#get_token_callback' get 'oauth/get_token_callback', to: 'oauth#get_token_callback'
resources :commit_logs, :only => [:create] resources :commit_logs, :only => [:create]
get 'activity/last', to: 'project_trends#last'
scope '/app' do scope '/app' do
get '/', to: 'installations#app' get '/', to: 'installations#app'