create repo while creating

This commit is contained in:
nigel007 2019-04-14 20:24:05 +08:00
parent c8689b3dd0
commit 46bafc9d35
1 changed files with 9 additions and 3 deletions

View File

@ -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