Skip to content

Commit

Permalink
UI: Fix JSON content in plugin install/upgrade/uninstall API requests
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyamalviya committed Sep 6, 2023
1 parent cb80f6b commit 2cb26c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const AvailablePlugins = (props) => {
}

const installPlugin = (pluginType: string, pluginName: string, pluginVersion: string) => {
let contents = JSON.stringify({plugin_type: pluginType, name: pluginName, version: pluginVersion});
let contents = {plugin_type: pluginType, name: pluginName, version: pluginVersion};
return IslandHttpClient.putJSON(APIEndpoint.installAgentPlugin, contents, true)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const InstalledPlugins = (props) => {
}, [installedPlugins, filters]);

const uninstallPlugin = (pluginType, pluginName) => {
let contents = JSON.stringify({plugin_type: pluginType, name: pluginName})
let contents = {plugin_type: pluginType, name: pluginName};
return IslandHttpClient.postJSON(APIEndpoint.uninstallAgentPlugin, contents, true)
}

Expand All @@ -74,7 +74,7 @@ const InstalledPlugins = (props) => {
}

const upgradePlugin = (pluginType, name, version) => {
let contents = JSON.stringify({plugin_type: pluginType, name: name, version: version});
let contents = {plugin_type: pluginType, name: name, version: version};
return IslandHttpClient.putJSON(APIEndpoint.installAgentPlugin, contents, true)
}

Expand Down

0 comments on commit 2cb26c8

Please sign in to comment.