diff --git a/app/controllers/sync_forge_controller.rb b/app/controllers/sync_forge_controller.rb index 51193a0ca..532d69ebd 100644 --- a/app/controllers/sync_forge_controller.rb +++ b/app/controllers/sync_forge_controller.rb @@ -6,16 +6,17 @@ class SyncForgeController < ApplicationController sync_params = params[:sync_params] #以前已同步的项目,那么肯定存在仓库 if Project.exists?(id: sync_params[:id], identifier: sync_params[:identifier]) - Rails.logger.info("=================begin_to_update_project========") + SyncLog.sync_log("=================begin_to_update_project========") project = Project.find_by(id: sync_params[:id]) check_sync_project(project, sync_params) else #新建项目 - Rails.logger.info("=================begin_to_create_new_project========") + SyncLog.sync_log("=================begin_to_create_new_project========") project_user = User.where(login: sync_params[:owner_login]).first project_params = { identifier: sync_params[:identifier], user_id: project_user.id, - is_public: sync_params[:is_public] + private: !sync_params[:is_public], + name: sync_params[:name] } project = Projects::CreateService.new(project_user, project_params).call if project.present? @@ -194,7 +195,6 @@ class SyncForgeController < ApplicationController def check_token sync_params = params[:sync_params] - Rails.logger.info("=======is_token:#{sync_params[:token] == get_token}=====================") unless sync_params[:token] && sync_params[:token] == get_token render json: {message: "token_errors"} end