From 9fee0222ba9dd330efcb35942ff450e71259f39a Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Mon, 18 Mar 2019 09:43:22 +0800 Subject: [PATCH] ecloud auth --- app/controllers/ecloud_controller.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/controllers/ecloud_controller.rb b/app/controllers/ecloud_controller.rb index 89a240c4..a391bcf4 100644 --- a/app/controllers/ecloud_controller.rb +++ b/app/controllers/ecloud_controller.rb @@ -17,7 +17,7 @@ require 'digest' class EcloudController < ApplicationController skip_before_filter :verify_authenticity_token - before_filter :check_sign, only: [:ps_new, :ps_update, :bs_new, :bs_update] + # before_filter :check_sign, only: [:ps_new, :ps_update, :bs_new, :bs_update] before_filter :save_para before_filter :user_setup @@ -105,6 +105,8 @@ class EcloudController < ApplicationController des_services = params['services'].select{|s| s['opttype'] == 1} if des_services.present? des_services.each do |ds| + + logger.info("666666#{ecloud.try(:id)}, 55555555#{ds['code']}") esd = EcloudService.where(ecloud_id: ecloud.try(:id), code: ds['code']).first esd.update_attributes!(opttype: ds['opttype'], begintime: ds['begintime'], endtime: ds['endtime']) end @@ -144,10 +146,10 @@ class EcloudController < ApplicationController # end render :json => {result: true, errmsg: ""} - rescue Exception => e - logger.error(e.message) - render :json => {code: 500, msg: "#{e.message}"} - raise ActiveRecord::Rollback + # rescue Exception => e + # logger.error(e.message) + # render :json => {code: 500, msg: "#{e.message}"} + # raise ActiveRecord::Rollback end end end