pre_develop
daiao 6 years ago
parent 51e4759bcc
commit c6f4da3187

@ -34,7 +34,7 @@ module Mobile
version 'v1', using: :path
format :json
content_type :json, "application/json;charset=UTF-8"
use ActionDispatch::Session::CookieStore, key: '_educoder_session'
use ActionDispatch::Session::CookieStore
require 'digest'
use Mobile::Middleware::ErrorHandler

@ -43,11 +43,13 @@ module Mobile
requires :accessType, type: Integer, desc: "资源类型"
end
get "source_url" do
if session[:third_party_user_id].blank?
user = User.find(params[:userId])
session[:third_party_user_id] = user.user_source.id
#self.logged_user = user
end
Rails.logger.info("####session: #{session}")
CnmoocsService.new.source_url(params)
end

@ -293,6 +293,7 @@ class AccountController < ApplicationController
UserActions.create(:action_id => User.current.id, :action_type => "Logout", :user_id => User.current.id)
logout_user
# 记录用户登出行为
logger.info("#########logout_session: #{session}")
redirect_to home_path
end
# display the logout form

Loading…
Cancel
Save