Browse Source

add function repo_use_blockchain to get param from front end form

pull/319/head
nigel007 5 years ago
parent
commit
99b631ced3
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      app/services/projects/create_service.rb

+ 6
- 1
app/services/projects/create_service.rb 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

Loading…
Cancel
Save