mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-22 04:35:45 +08:00
change chain
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user