Skip to content

Commit be38ca8

Browse files
committed
refac
1 parent bd3a363 commit be38ca8

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/routes/+layout.svelte

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -982,6 +982,14 @@
982982
} catch (error) {
983983
console.error('Error refreshing backend config:', error);
984984
}
985+
986+
// Relay auth token to desktop app for API access
987+
if (window.electronAPI?.send) {
988+
window.electronAPI.send({
989+
type: 'token:update',
990+
token: localStorage.token
991+
}).catch(() => {});
992+
}
985993
} else {
986994
// Redirect Invalid Session User to /auth Page
987995
localStorage.removeItem('token');

0 commit comments

Comments
 (0)