新增:branch列表接口

This commit is contained in:
2023-02-03 10:53:24 +08:00
parent bfe14352c0
commit 3f78899c58
5 changed files with 51 additions and 3 deletions

View File

@@ -1,5 +1,9 @@
class Api::V1::Projects::BranchesController < Api::V1::BaseController
before_action :require_public_and_member_above, only: [:all]
before_action :require_public_and_member_above, only: [:index, :all]
def index
@result_object = Api::V1::Projects::Branches::ListService.call(@project, {name: params[:name], page: page, limit: limit}, current_user&.gitea_token)
end
def all
@result_object = Api::V1::Projects::Branches::AllListService.call(@project, current_user&.gitea_token)