aboutsummaryrefslogtreecommitdiff
path: root/shardweb/assets/js
diff options
context:
space:
mode:
Diffstat (limited to 'shardweb/assets/js')
-rw-r--r--shardweb/assets/js/socket.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/shardweb/assets/js/socket.js b/shardweb/assets/js/socket.js
index 5088721..4c340f0 100644
--- a/shardweb/assets/js/socket.js
+++ b/shardweb/assets/js/socket.js
@@ -5,7 +5,8 @@
// and connect at the socket path in "lib/web/endpoint.ex":
import {Socket} from "phoenix"
-let socket = new Socket("/socket", {params: {token: window.userToken}})
+let pk = window.Gon.getAsset('pk');
+let socket = new Socket("/socket", {params: {token: window.userToken, pk: pk}})
// When you connect, you'll often need to authenticate the client.
// For example, imagine you have an authentication plug, `MyAuth`,