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

@@ -1,2 +1,18 @@
module MembersHelper
def get_user_token(user_login,reponame)
query_params = {
type: "query",
chain_params: {
reponame: reponame,
username: user_login
}
}
response = Gitea::Chain::ChainGetService.new(query_params).call
if response.status == 200
return JSON.parse(response.body)["balance"].to_i
else
return 0
end
end
end