修改了create api,增加了插入blockchain_project_clients表的操作

This commit is contained in:
nigel007 2019-07-25 15:15:51 +08:00
parent f26d5c6e59
commit 5855087f2d
1 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,17 @@
class BlockchainProjectClientsService
# 创建blockchain_project_clients表的一条记录
def create_item(project, user, params)
status = -1
bpc = BlockchainProjectClient.new
bpc.project_id = project.id
bpc.user_id = user.id
bpc.node_id = params[:node_id]
if bpc.save
status = 0
return status, bpc
end
return status, nil
end
end