From 34d1a34b10f4386865f3c241c5ae4026d2bfd8bd Mon Sep 17 00:00:00 2001 From: AAGaming Date: Sat, 5 Aug 2023 01:11:43 -0400 Subject: Migrate most of frontend callServerMethod usage over to websocket --- frontend/src/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'frontend/src/index.ts') diff --git a/frontend/src/index.ts b/frontend/src/index.ts index 6588cb5c..3a0c4880 100644 --- a/frontend/src/index.ts +++ b/frontend/src/index.ts @@ -2,5 +2,11 @@ (async () => { console.debug('Setting up decky-frontend-lib...'); window.DFL = await import('decky-frontend-lib'); + console.debug('Authenticating to Decky backend...'); + window.deckyAuthToken = await fetch('http://127.0.0.1:1337/auth/token').then((r) => r.text()); + console.debug('Connecting to Decky backend...'); + window.DeckyBackend = new (await import('./wsrouter')).WSRouter(); + await window.DeckyBackend.connect(); + console.debug('Starting Decky!'); await import('./start'); })(); -- cgit v1.2.3