diff options
| author | Party Wumpus <48649272+PartyWumpus@users.noreply.github.com> | 2023-10-17 13:44:44 +0100 |
|---|---|---|
| committer | marios8543 <marios8543@gmail.com> | 2023-10-18 02:37:48 +0300 |
| commit | 836bcfbc03262d207dbcf5476f0ac08fb0787f61 (patch) | |
| tree | 1b894a6a23266abd2959cce8f7b697a8bd82944b | |
| parent | 64867369f9ed3b525225552a7a9340e0cdadd8c0 (diff) | |
| download | decky-loader-836bcfbc03262d207dbcf5476f0ac08fb0787f61.tar.gz decky-loader-836bcfbc03262d207dbcf5476f0ac08fb0787f61.zip | |
fix logical error when no store was set
| -rw-r--r-- | frontend/src/store.tsx | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/frontend/src/store.tsx b/frontend/src/store.tsx index 2cc1495d..9fc8006f 100644 --- a/frontend/src/store.tsx +++ b/frontend/src/store.tsx @@ -44,7 +44,28 @@ export async function getPluginList(): Promise<StorePlugin[]> { if (store === null) { console.log('Could not get store, using Default.'); await setSetting('store', Store.Default); - store = Store.Default; + store = Store.Default + } + switch (+store) { + case Store.Default: + storeURL = 'https://plugins.deckbrew.xyz/plugins'; + break; + case Store.Testing: + storeURL = 'https://testing.deckbrew.xyz/plugins'; + break; + case Store.Custom: + storeURL = customURL; + break; + default: + console.error('Somehow you ended up without a standard URL, using the default URL.'); + storeURL = 'https://plugins.deckbrew.xyz/plugins'; + break; + return fetch(storeURL, { + method: 'GET', + headers: { + 'X-Decky-Version': version.current, + }, + }).then((r) => r.json()); } switch (+store) { case Store.Default: |
