Commit 65ab238c authored by Mahmoud Aglan's avatar Mahmoud Aglan

fix: use App.token/App.user instead of non-existent App.getSession

Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent fa7328ff
......@@ -61,14 +61,13 @@ document.addEventListener('DOMContentLoaded', function() {
var code = params.get('code');
var matchId = params.get('id');
var session = App.getSession ? App.getSession() : null;
if (!session || !session.access_token) {
if (!App.isLoggedIn()) {
window.location.href = '/login';
return;
}
var token = session.access_token;
var userId = session.user ? session.user.id : null;
var token = App.token;
var userId = App.user ? App.user.id : null;
LudoLive.setAuth(token, userId);
......
......@@ -31,13 +31,12 @@ $extraCss = ['/public/css/ludo.css'];
<script>
document.addEventListener('DOMContentLoaded', function() {
var session = App.getSession ? App.getSession() : null;
if (!session || !session.access_token) {
if (!App.isLoggedIn()) {
window.location.href = '/login';
return;
}
var token = session.access_token;
var token = App.token;
var timerEl = document.getElementById('mm-timer');
var startTime = Date.now();
var pollInterval = null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment