mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-30 23:08:00 +01:00
12 lines
330 B
JavaScript
12 lines
330 B
JavaScript
|
// Action Cable provides the framework to deal with WebSockets in Rails.
|
||
|
// You can generate new channels where WebSocket features live using the rails generate channel command.
|
||
|
let cable;
|
||
|
|
||
|
function setupCable() {
|
||
|
if (window.booru.userIsSignedIn) {
|
||
|
cable = ActionCable.createConsumer();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export { cable, setupCable };
|