From 3f14b96b71689399404f17581c4ed2d67ad6e4ae Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Fri, 5 Aug 2022 13:13:51 +0530 Subject: [PATCH] UI: Get IP addresses from /api/island/ip-addresses instead of /api in AWSRunOptions.js --- .../pages/RunMonkeyPage/RunOnAWS/AWSRunOptions.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage/RunOnAWS/AWSRunOptions.js b/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage/RunOnAWS/AWSRunOptions.js index e6c2290b2..a91da1c36 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage/RunOnAWS/AWSRunOptions.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage/RunOnAWS/AWSRunOptions.js @@ -32,11 +32,11 @@ const getContents = (props) => { }, []); function getIps() { - authComponent.authFetch('/api') + authComponent.authFetch('/api/island/ip-addresses') .then(res => res.json()) - .then(res => { - setAllIPs(res['ip_addresses']); - setSelectedIp(res['ip_addresses'][0]); + .then(ip_addresses => { + setAllIPs(ip_addresses); + setSelectedIp(ip_addresses[0]); }); }