mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-24 13:45:44 +08:00
新增:接口service构建
This commit is contained in:
19
app/services/reposync/delete_branch_service.rb
Normal file
19
app/services/reposync/delete_branch_service.rb
Normal file
@@ -0,0 +1,19 @@
|
||||
class Reposync::DeleteBranchService < Reposync::ClientService
|
||||
|
||||
attr_accessor :repo_name, :branch_name
|
||||
|
||||
def initialize(repo_name, branch_name)
|
||||
@repo_name = repo_name
|
||||
@branch_name = branch_name
|
||||
end
|
||||
|
||||
def call
|
||||
result = delete(url)
|
||||
response = render_response(result)
|
||||
end
|
||||
|
||||
private
|
||||
def url
|
||||
"/cerobot/sync/#{repo_name}/branch/#{branch_name}"
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user