change chain

This commit is contained in:
sylor_huang@126.com
2020-06-09 18:55:09 +08:00
parent d586f526c9
commit 79641e859c
11 changed files with 114 additions and 101 deletions

View File

@@ -13,11 +13,11 @@ class Gitea::Chain::ChainGetService < Gitea::ChainService
private
def request_params
Hash.new.merge(data: params["chain_params"])
params[:chain_params]
end
def url
chain_type = params["type"].to_s
chain_type = params[:type].to_s
case chain_type
when "query"
"/repos/amount/query".freeze

View File

@@ -13,11 +13,11 @@ class Gitea::Chain::ChainPostService < Gitea::ChainService
private
def request_params
Hash.new.merge(data: params["chain_params"])
Hash.new.merge(data: params[:chain_params])
end
def url
chain_type = params["type"].to_s
chain_type = params[:type].to_s
case chain_type
when "create"
"/repos/create".freeze