summaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authorParty Wumpus <48649272+PartyWumpus@users.noreply.github.com>2023-10-17 13:44:44 +0100
committermarios8543 <marios8543@gmail.com>2023-10-31 23:18:30 +0200
commitf508d1dfceea0334ad7a22d8391ace8e30ad7914 (patch)
treeb86a3516aa4ee1af35f93f01b5a9bed86b89a741 /frontend
parent8dc6f19d2b7b245d15d89ee14aba7c10ad9b7215 (diff)
downloaddecky-loader-f508d1dfceea0334ad7a22d8391ace8e30ad7914.tar.gz
decky-loader-f508d1dfceea0334ad7a22d8391ace8e30ad7914.zip
fix logical error when no store was set
Diffstat (limited to 'frontend')
-rw-r--r--frontend/src/store.tsx23
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: