小程序解除绑定

sso^2
cxt 5 years ago
parent d7c1f82c1f
commit c24d9bc943

@ -0,0 +1,15 @@
class Weapps::UnbindAccountsController < Weapps::BaseController
before_action :require_login
def show
@user = current_user
end
def destroy
open_user = OpenUsers::Wechat.find_by!(user_id: current_user.id)
open_user.destroy!
UserAction.create(action_id: current_user.id, action_type: "UnbindWechat", user_id: current_user.id, :ip => request.remote_ip)
logout_user
render_ok
end
end

@ -0,0 +1 @@
json.user_account @user.phone.present? ? @user.phone : @user.mail

@ -1019,6 +1019,7 @@ Rails.application.routes.draw do
resource :code_session, only: [:create]
resource :verify, only: [:create]
resource :check_account, only: [:create]
resource :unbind_accounts, only: [:show, :destroy]
resources :searchs, only: [:index]
resources :course_stickies, only: [:create] do

Loading…
Cancel
Save