add function repo_use_blockchain to get param from front end form

This commit is contained in:
nigel007 2020-12-30 16:18:46 +08:00
parent 4c9df8c830
commit 99b631ced3
1 changed files with 6 additions and 1 deletions

View File

@ -36,7 +36,8 @@ class Projects::CreateService < ApplicationService
is_public: repo_is_public,
ignore_id: params[:ignore_id],
license_id: params[:license_id],
identifier: params[:repository_name] #新增,hs
identifier: params[:repository_name], #新增,hs
use_blockchain: repo_use_blockchain # 新增,zxh
}
end
@ -55,4 +56,8 @@ class Projects::CreateService < ApplicationService
def repo_is_public
params[:private].blank? ? true : !params[:private]
end
def repo_use_blockchain
params[:blockchain].blank? ? false : params[:blockchain]
end
end