fix installing plugins

This commit is contained in:
AAGaming
2022-06-29 12:25:50 -04:00
parent 79e8af8be6
commit 3f2a2bbc04
2 changed files with 7 additions and 5 deletions
+3
View File
@@ -19,6 +19,8 @@ export interface StorePlugin {
export async function installFromURL(url: string) {
const formData = new FormData();
const splitURL = url.split('/');
formData.append('name', splitURL[splitURL.length - 1].replace('.zip', ''));
formData.append('artifact', url);
await fetch('http://localhost:1337/browser/install_plugin', {
method: 'POST',
@@ -28,6 +30,7 @@ export async function installFromURL(url: string) {
export async function requestPluginInstall(plugin: StorePlugin, selectedVer: StorePluginVersion) {
const formData = new FormData();
formData.append('name', plugin.name);
formData.append('artifact', `https://cdn.tzatzikiweeb.moe/file/steam-deck-homebrew/versions/${selectedVer.hash}.zip`);
formData.append('version', selectedVer.name);
formData.append('hash', selectedVer.hash);