change bugs

This commit is contained in:
sylor_huang@126.com 2020-07-10 11:14:08 +08:00
parent 6395dad2f1
commit 2b7dec7f56
1 changed files with 12 additions and 0 deletions

View File

@ -15,6 +15,18 @@ class Repositories::CreateService < ApplicationService
gitea_repository = Gitea::Repository::CreateService.new(user.gitea_token, gitea_repository_params).call
sync_project(@repository, gitea_repository)
sync_repository(@repository, gitea_repository)
if project.project_type == "common"
chain_params = {
type: "create",
chain_params:{
username: user.try(:login),
reponame: @repository.try(:identifier),
token_name: @repository.try(:identifier),
total_supply: 1000000
}
}
PostChainJob.perform_later(chain_params) #创建上链操作
end
else
Rails.logger.info("#############___________create_repository_erros______###########{@repository.errors.messages}")
end