Send version when asking for plugin list

This commit is contained in:
TrainDoctor
2022-10-22 16:52:18 -07:00
parent 0226bd2bf8
commit c546a818f1

View File

@@ -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());
}