1 line
311 B
JavaScript
1 line
311 B
JavaScript
document.getElementById('roomPickerLogout').addEventListener('click',async()=>{try{const r=await fetch('/api/auth/logout',{method:'POST',credentials:'same-origin'});if(!r.ok)throw Error('Sign out failed');location.replace('/login');}catch(e){document.getElementById('roomPickerError').textContent=e.message;}}); |