diff --git a/index.js b/index.js index 660b276..28da44f 100644 --- a/index.js +++ b/index.js @@ -77,8 +77,7 @@ async function vpnConnect(vpnName) { 'Content-Type': 'application/json', }, }); - const ipResponse = await response.json(); - const ip = ipResponse.data; + const ip = await response.json(); consoleLog(`[${host}] VPN connection successfully established to ${vpnName} (IP: ${ip.data}).`, 'info'); return 0; }