mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-17 02:05:58 +08:00
29 lines
410 B
Ruby
29 lines
410 B
Ruby
class Gitea::Chain::ChainGetService < Gitea::ChainService
|
|
|
|
attr_reader :params
|
|
|
|
def initialize(params)
|
|
@params = params
|
|
end
|
|
|
|
def call
|
|
get(url, request_params)
|
|
end
|
|
|
|
private
|
|
|
|
def request_params
|
|
params[:chain_params]
|
|
end
|
|
|
|
def url
|
|
chain_type = params[:type].to_s
|
|
case chain_type
|
|
when "query"
|
|
"/repos/amount/query".freeze
|
|
else
|
|
"".freeze
|
|
end
|
|
end
|
|
|
|
end |