mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-15 17:25:26 -04:00
Fix stale deleted sessions in sidebar (#1203)
Co-authored-by: ghreprimand <203024559+ghreprimand@users.noreply.github.com>
This commit is contained in:
+1
-4
@@ -3130,10 +3130,7 @@ function initializeEventListeners() {
|
||||
const idx = sessions.findIndex(s => s.id === currentId);
|
||||
const nextSession = sessions.filter(s => !s.archived && s.id !== currentId)[Math.max(0, idx)] ||
|
||||
sessions.find(s => !s.archived && s.id !== currentId);
|
||||
const res = await fetch(`${API_BASE}/api/session/${currentId}/archive`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
});
|
||||
const res = await fetch(`${API_BASE}/api/session/${currentId}`, { method: 'DELETE' });
|
||||
if (res.ok) {
|
||||
await sessionModule.loadSessions();
|
||||
if (nextSession) {
|
||||
|
||||
Reference in New Issue
Block a user