From b7d7ca04e12690b5e65259c8806e5e895cdc16aa Mon Sep 17 00:00:00 2001 From: botato <63275405+botatooo@users.noreply.github.com> Date: Sat, 27 Aug 2022 00:01:23 -0400 Subject: Refractor plugin backend (#111) * refractor uninstall plugin backend * refractor plugin installation method * Change formatting in browser.py * Manually format main.py * Manually format utilities.py * remove inconsistency * remove unnecessary linebreaks * lol what * last minute pythoning * Fix async missing * lint * more refractor * await forgotten * fix: menu not disappearing after first click * lint * bug: fix double click on uninstall * depricate request installs * basic patch notes viewer, lazy-load settings and store, build frontend as esmodule, add lazy-loaded react-markdown, backend changes to accomodate ESModule frontend * refractor uninstall plugin backend * Change formatting in browser.py * Manually format main.py * Manually format utilities.py * remove unnecessary linebreaks * lol what * last minute pythoning * Fix async missing * rebase onto main * fix error, fix React crash if patch notes are opened before remote version info is loaded Co-authored-by: TrainDoctor Co-authored-by: AAGaming --- frontend/src/plugin-loader.tsx | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'frontend/src/plugin-loader.tsx') diff --git a/frontend/src/plugin-loader.tsx b/frontend/src/plugin-loader.tsx index 661a2f67..85b03704 100644 --- a/frontend/src/plugin-loader.tsx +++ b/frontend/src/plugin-loader.tsx @@ -150,16 +150,7 @@ class PluginLoader extends Logger { showModal( { - const formData = new FormData(); - formData.append('name', name); - await fetch('http://localhost:1337/browser/uninstall_plugin', { - method: 'POST', - body: formData, - credentials: 'include', - headers: { - Authentication: window.deckyAuthToken, - }, - }); + await this.callServerMethod('uninstall_plugin', { name }); }} onCancel={() => { // do nothing -- cgit v1.2.3