diff --git a/app/api/mobile/apis/blockchains.rb b/app/api/mobile/apis/blockchains.rb index 352210f43..0c7265c91 100644 --- a/app/api/mobile/apis/blockchains.rb +++ b/app/api/mobile/apis/blockchains.rb @@ -59,7 +59,7 @@ module Mobile post 'join' do authenticate! # 根据repo_git_url找到repository对应的项目 - + Rails.logger.info("!!!!!!!!!!!in the join function") rs = RepositoriesService.new rs.findProjectByRepoUrl(params[:repo_url]) # owner = User.find_by_login(params[:ownername]) diff --git a/app/services/repositories_service.rb b/app/services/repositories_service.rb index 8ec9acc9d..60d9fd981 100644 --- a/app/services/repositories_service.rb +++ b/app/services/repositories_service.rb @@ -46,11 +46,12 @@ class RepositoriesService # 根据repo_url,找到所属project def findProjectByRepoUrl repo_url # 解析ownername + Rails.logger.info("in the findProjectByRepoUrl function") repo_url = repo_url[Redmine::Configuration['gitlab_address'].to_s.length + 1..repo_url.length - 1] index_split = repo_url.index("/") owner_name = repo_url[0..index_split - 1] - puts "!!!!!!!!!!this is the owner name" - puts owner_name + Rails.logger.info("!!!!!!!!!!this is the owner name") + Rails.logger.info(owner_name) end end \ No newline at end of file