|
|
|
@@ -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 |