修改了create api,增加了插入blockchain_project_clients表的操作
This commit is contained in:
parent
f26d5c6e59
commit
5855087f2d
|
@ -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
|
Loading…
Reference in New Issue