From c546a818f116d3344da1a9c866555036fcb9a7cc Mon Sep 17 00:00:00 2001
From: TrainDoctor <traindoctor@protonmail.com>
Date: Sat, 22 Oct 2022 16:52:18 -0700
Subject: Send version when asking for plugin list

---
 frontend/src/store.tsx | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'frontend/src/store.tsx')

diff --git a/frontend/src/store.tsx b/frontend/src/store.tsx
index bdaae6f2..6eba807f 100644
--- a/frontend/src/store.tsx
+++ b/frontend/src/store.tsx
@@ -29,9 +29,13 @@ export interface LegacyStorePlugin {
 // name: version
 export type PluginUpdateMapping = Map<string, StorePluginVersion>;
 
-export function getPluginList(): Promise<StorePlugin[]> {
+export async function getPluginList(): Promise<StorePlugin[]> {
+  let version = await window.DeckyPluginLoader.updateVersion();
   return fetch('https://beta.deckbrew.xyz/plugins', {
     method: 'GET',
+    headers: {
+      'X-Decky-Version': version.current,
+    },
   }).then((r) => r.json());
 }
 
-- 
cgit v1.2.3

