diff --git a/app/api/mobile/apis/blockchains.rb b/app/api/mobile/apis/blockchains.rb index 8b0836345..626c2cf4b 100644 --- a/app/api/mobile/apis/blockchains.rb +++ b/app/api/mobile/apis/blockchains.rb @@ -66,7 +66,7 @@ module Mobile blockchain = Blockchain.find_by_project_id(project.id) if blockchain Rails.logger.info("!!!!!!!!!find the project's blockchain info") - {status:status, genesis_content:blockchain.genesis_content, network_id:blockchain.network_id, connect_ip:blockchain.connect_ip, port:blockchain.port, enode:blockchain.enode} + {status:status, port:blockchain.port, enode:blockchain.enode} else Rails.logger.info("!!!!!!!!!not find the project's blockchain info") {status:-1, message: '数据库有问题,blockchain信息不存在'} diff --git a/app/models/blockchain.rb b/app/models/blockchain.rb index 01c1b8983..bef5f997d 100644 --- a/app/models/blockchain.rb +++ b/app/models/blockchain.rb @@ -1,5 +1,5 @@ class Blockchain < ActiveRecord::Base - attr_accessible :id, :project_id, :genesis_content, :network_id, :connect_ip, :port, :enode, :created_at, :updated_at, :user_id + attr_accessor :id, :project_id, :genesis_content, :network_id, :connect_ip, :port, :enode, :created_at, :updated_at, :user_id has_one :project, :dependent => :destroy # 根据项目id查找对应区块链配置信息