change return for join service

This commit is contained in:
nigel007 2019-06-07 15:46:12 +08:00
parent 34daf5d94a
commit 9d0d3854ae
1 changed files with 6 additions and 1 deletions

View File

@ -63,7 +63,12 @@ module Mobile
status, project = rs.findProjectByRepoUrl(params[:repo_url])
if project
blockchain = Blockchain.find_by_project_id(project.id)
{status:status, genesis_content:blockchain.genesis_content, network_id:blockchain.network_id, connect_ip:blockchain.connect_ip, port:blockchain.port, enode:blockchain.enode}
if blockchain
Rails.logger.info("!!!!!!!this is the return values")
{status:status, genesis_content:blockchain.genesis_content, network_id:blockchain.network_id, connect_ip:blockchain.connect_ip, port:blockchain.port, enode:blockchain.enode}
else
{status:-1, message: '数据库有问题blockchain信息不存在'}
end
else
{status:-1, message: '该项目不存在' }
end