mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-22 12:45:46 +08:00
新增: 获取比较blame、token以及异常捕获处理
This commit is contained in:
@@ -3,6 +3,5 @@ class Api::V1::Projects::CommitsController < Api::V1::BaseController
|
||||
|
||||
def diff
|
||||
@result_object = Api::V1::Projects::Commits::DiffService.call(@project, params[:sha], current_user&.gitea_token)
|
||||
puts @result_object
|
||||
end
|
||||
end
|
||||
@@ -1,5 +1,5 @@
|
||||
class Api::V1::ProjectsController < Api::V1::BaseController
|
||||
before_action :load_project, only: [:show]
|
||||
before_action :require_public_and_member_above, only: [:show, :compare]
|
||||
|
||||
def index
|
||||
render_ok
|
||||
@@ -8,4 +8,8 @@ class Api::V1::ProjectsController < Api::V1::BaseController
|
||||
def show
|
||||
@result_object = Api::V1::Projects::GetService.call(@project, current_user.gitea_token)
|
||||
end
|
||||
|
||||
def compare
|
||||
@result_object = Api::V1::Projects::CompareService.call(@project, params[:from], params[:to], current_user&.gitea_token)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user