1
0
mirror of https://github.com/danbee/chess synced 2025-03-04 08:39:06 +00:00
chess/assets/js/services/channel.js

17 lines
301 B
JavaScript

import socket from "../socket";
const Channel = {
gameChannel: (gameId) => {
const channel = socket.channel(`game:${gameId}`, {});
channel.join()
.receive("error", resp => {
console.log("Unable to join", resp);
});
return channel;
},
};
export default Channel;