create repo while creating
This commit is contained in:
parent
c8689b3dd0
commit
46bafc9d35
|
@ -24,9 +24,15 @@ module Mobile
|
|||
status, project = ps.createNewProjectBlockchain params,user
|
||||
if status == 0
|
||||
# 表示项目创建成功
|
||||
bs = BlockchainsService.new
|
||||
status, blockchain = bs.create_item project, user, params # 创建blockchain item
|
||||
present :status, status # status -1:表示创建失败; 1:表示创建成功
|
||||
# 创建版本库
|
||||
rs = RepositoriesService.new
|
||||
params_repository = ActiveSupport::HashWithIndifferentAccess.new(identifier: project.name)
|
||||
status, repository = rs.createNewRepoBlockchain project, params_repository
|
||||
if status == 0
|
||||
bs = BlockchainsService.new
|
||||
status, blockchain = bs.create_item project, user, params # 创建blockchain item
|
||||
present :status, status # status -1:表示创建失败; 1:表示创建成功
|
||||
end
|
||||
end
|
||||
present :status, status # status -1:表示创建失败; 1:表示创建成功
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue