mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-20 19:55:56 +08:00
新增:最新提交列表接口
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
class Api::V1::Projects::CommitsController < Api::V1::BaseController
|
||||
before_action :require_public_and_member_above, only: [:index, :diff]
|
||||
before_action :require_public_and_member_above, only: [:index, :diff, :recent]
|
||||
|
||||
def index
|
||||
@result_object = Api::V1::Projects::Commits::ListService.call(@project, {page: page, limit: limit, sha: params[:sha]}, current_user&.gitea_token)
|
||||
@@ -9,4 +9,8 @@ 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)
|
||||
end
|
||||
|
||||
def recent
|
||||
@result_object = Api::V1::Projects::Commits::RecentService.call(@project, {page: page, limit: limit}, current_user&.gitea_token)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user