From cc17a57e20bdb8edcfd56000da95e0e0a2f4c9cb Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Wed, 13 Jul 2022 19:06:42 +0530 Subject: [PATCH] UI: Extract URL to constant in ConfigurePage.js --- .../monkey_island/cc/ui/src/components/pages/ConfigurePage.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js b/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js index 9590fced2..a10823564 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js @@ -21,6 +21,7 @@ import {reformatConfig} from '../configuration-components/ReformatHook'; const CONFIG_URL = '/api/agent-configuration'; const RESET_URL = '/api/reset-agent-configuration'; +const CONFIGURED_PROPAGATION_CREDENTIALS_URL = '/api/propagation-credentials/configured-credentials'; export const API_PBA_LINUX = '/api/file-upload/PBAlinux'; export const API_PBA_WINDOWS = '/api/file-upload/PBAwindows'; @@ -238,7 +239,7 @@ class ConfigurePageComponent extends AuthComponent { this.removePBAfile(API_PBA_WINDOWS, this.setPbaFilenameWindows) this.removePBAfile(API_PBA_LINUX, this.setPbaFilenameLinux) }) - .then(this.authFetch('/api/propagation-credentials/configured-credentials', {method: 'DELETE'})); + .then(this.authFetch(CONFIGURED_PROPAGATION_CREDENTIALS_URL, {method: 'DELETE'})); }; removePBAfile(apiEndpoint, setFilenameFnc) {