Skip to content

Commit

Permalink
avoid sending undefined usertToken when connecting to socket. see: #129
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonic committed Nov 27, 2021
1 parent b58d74e commit 71f69b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion assets/js/socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
// from the params if you are not using authentication.
import {Socket} from "phoenix"

let socket = new Socket("/socket", {params: {token: window.userToken}})
console.log('attempting to connect to socket ...')
let socket = new Socket("/socket") // , {params: {token: window.userToken}})

// Connect to the socket:
socket.connect()
Expand Down
4 changes: 3 additions & 1 deletion lib/hits_web/controllers/page_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ defmodule HitsWeb.PageController do
use HitsWeb, :controller

def index(conn, _params) do
render(conn, "index.html")
conn
# |>
|> render("index.html")
end
end

0 comments on commit 71f69b7

Please sign in to comment.