refactor
This commit is contained in:
parent
023bf29e0b
commit
79c5596766
|
|
@ -16,21 +16,6 @@
|
|||
|
||||
{% block javascripts %}
|
||||
{% block importmap %}{{ importmap('app') }}{% endblock %}
|
||||
<script>
|
||||
const eventSource = new EventSource("{{ mercure('http://solutions-easy.moi/connect?userId='~ app.user.userIdentifier)|raw }}");
|
||||
if (!sessionStorage.getItem('tabId')) {
|
||||
sessionStorage.setItem('tabId', self.crypto.randomUUID ? self.crypto.randomUUID() : Math.random().toString(36).substr(2, 9));
|
||||
}
|
||||
const tabId = sessionStorage.getItem('tabId');
|
||||
console.log('Tab ID:', tabId);
|
||||
|
||||
fetch('/register-tab', {
|
||||
method: 'POST',
|
||||
headers: {'Content-Type': 'application/json'},
|
||||
body: JSON.stringify({ tabId: tabId })
|
||||
});
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
|||
Loading…
Reference in New Issue