新增:接口service构建

This commit is contained in:
2024-04-13 21:09:08 +08:00
parent ad9345badb
commit 04e70b3b34
12 changed files with 359 additions and 0 deletions

View 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