Browse Source

change bugs

tags/v1
sylor_huang@126.com 6 years ago
parent
commit
dbfef20434
1 changed files with 3 additions and 4 deletions
  1. +3
    -4
      app/controllers/sync_forge_controller.rb

+ 3
- 4
app/controllers/sync_forge_controller.rb View File

@@ -2,11 +2,10 @@ class SyncForgeController < ApplicationController
before_action :check_token

def create
sync_params = params["sync_params"]
Rails.logger.info("========sync_params=1==#{params["sync_params"]}====")
sync_params = params[:sync_params]
Rails.logger.info("========sync_params=2==#{params[:sync_params]}====")

sync_params = eval(sync_params)
# sync_params = eval(sync_params)

#以前已同步的项目,那么肯定存在仓库
if Project.exists?(id: sync_params[:id], identifier: sync_params[:identifier])
@@ -188,7 +187,7 @@ class SyncForgeController < ApplicationController
end

def check_token
sync_params = params[:sync_params][0]
sync_params = params[:sync_params]
unless sync_params[:token] && sync_params[:token] == get_token
render json: {message: "token_errors"}
end


Loading…
Cancel
Save