FIX actioncable job

This commit is contained in:
Jasder
2020-07-07 16:08:10 +08:00
parent 3cae1d4eb7
commit df6bddfb8d
5 changed files with 40 additions and 21 deletions

View File

@@ -9,8 +9,9 @@ module ApplicationCable
private
def find_verified_user
puts "############### cookies.signed[:signed_user_id]: #{cookies.signed[:user_id]}"
puts "############### cookies.signed[:user_id]: #{cookies.signed[:user_id]}"
if current_user = User.find_by(id: cookies.signed[:user_id])
puts "############### find_verified_user success! ###############"
current_user
else
reject_unauthorized_connection

View File

@@ -1,7 +1,6 @@
class MirrorProjectChannel < ApplicationCable::Channel
def subscribed
Rails.logger.info "################### channel params: #{params}"
# @project = Project.find_by_identifier params[:id]
stream_from "channel_room_#{params[:id]}"
end