update blockchain related services
This commit is contained in:
parent
3f618b3a09
commit
79eb1b93e9
|
@ -367,7 +367,7 @@ class ApplicationController < ActionController::Base
|
||||||
# RSS key authentication does not start a session
|
# RSS key authentication does not start a session
|
||||||
User.find_by_rss_key(params[:key])
|
User.find_by_rss_key(params[:key])
|
||||||
end
|
end
|
||||||
# User.current = User.find(2) # need to remove this statement before running in production
|
User.current = User.find(2) # need to remove this statement before running in production
|
||||||
end
|
end
|
||||||
|
|
||||||
def user_trace_log
|
def user_trace_log
|
||||||
|
|
|
@ -13,7 +13,8 @@ class Blockchain::TransferService < ApplicationService
|
||||||
payer = params['payer_id'].to_s
|
payer = params['payer_id'].to_s
|
||||||
payee = User.find_by(login: transfer_login)
|
payee = User.find_by(login: transfer_login)
|
||||||
if payee.nil?
|
if payee.nil?
|
||||||
normal_status(-1, "未找到用户")
|
# normal_status(-1, "未找到用户")
|
||||||
|
return false
|
||||||
else
|
else
|
||||||
payee = payee.id.to_s
|
payee = payee.id.to_s
|
||||||
token_name = params['project_id'].to_s
|
token_name = params['project_id'].to_s
|
||||||
|
@ -24,7 +25,8 @@ class Blockchain::TransferService < ApplicationService
|
||||||
end
|
end
|
||||||
rescue => e
|
rescue => e
|
||||||
puts "转账失败: #{e.message}"
|
puts "转账失败: #{e.message}"
|
||||||
normal_status(-1, e.message)
|
# normal_status(-1, e.message)
|
||||||
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
Loading…
Reference in New Issue