Skip to content

Commit

Permalink
UI: Use IslandHttpClient for uninstall plugin API request
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyamalviya authored and VakarisZ committed Sep 6, 2023
1 parent fe412b5 commit f131522
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,8 @@ const InstalledPlugins = (props) => {
}, [installedPlugins, filters]);

const uninstallPlugin = (pluginType, pluginName) => {
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({plugin_type: pluginType, name: pluginName})
};
return authComponent.authFetch('/api/uninstall-agent-plugin', options, true)
let contents = JSON.stringify({plugin_type: pluginType, name: pluginName})
return IslandHttpClient.postJSON(APIEndpoint.uninstallAgentPlugin, contents, true)
}

const onUninstallClick = (pluginId, pluginType, pluginName) => {
Expand Down

0 comments on commit f131522

Please sign in to comment.