mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-19 11:15:56 +08:00
新增: 获取单文件blame信息
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
class Api::V1::ProjectsController < Api::V1::BaseController
|
||||
before_action :require_public_and_member_above, only: [:show, :compare]
|
||||
before_action :require_public_and_member_above, only: [:show, :compare, :blame]
|
||||
|
||||
def index
|
||||
render_ok
|
||||
@@ -12,4 +12,9 @@ class Api::V1::ProjectsController < Api::V1::BaseController
|
||||
def compare
|
||||
@result_object = Api::V1::Projects::CompareService.call(@project, params[:from], params[:to], current_user&.gitea_token)
|
||||
end
|
||||
|
||||
def blame
|
||||
@result_object = Api::V1::Projects::BlameService.call(@project, params[:sha], params[:filepath], current_user&.gitea_token)
|
||||
puts @result_object
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user