diff --git a/src/_services/network.service.js b/src/_services/network.service.js index 03bb605..6d0fcaa 100644 --- a/src/_services/network.service.js +++ b/src/_services/network.service.js @@ -48,9 +48,15 @@ function startNetwork(userId, planId, cloud, region, exactRegion, messages, erro return fetch(`${config.apiUrl}/users/${userId}/networks/${planId}/actions/start${cloudAndRegion}`, util.postWithAuth()).then(util.handleCrudResponse(messages, errors)); } -function forkNetwork(userId, planId, forkHost, cloud, region, exactRegion, messages, errors) { - const cloudAndRegion = getCloudAndRegion(cloud, region, exactRegion); - return fetch(`${config.apiUrl}/users/${userId}/networks/${planId}/actions/fork/${forkHost}${cloudAndRegion}`, util.putWithAuth()).then(util.handleCrudResponse(messages, errors)); +function forkNetwork(userId, planId, forkHost, adminEmail, cloud, region, exactRegion, messages, errors) { + const forkRequest = { + fqdn: forkHost, + adminEmail: adminEmail, + cloud: cloud, + region: region, + exactRegion: exactRegion + }; + return fetch(`${config.apiUrl}/users/${userId}/networks/${planId}/actions/fork`, util.putWithAuth(forkRequest)).then(util.handleCrudResponse(messages, errors)); } function getStatusesByNetworkId(userId, networkId, messages, errors) { diff --git a/src/_store/networks.module.js b/src/_store/networks.module.js index 58e5f6a..8514f12 100644 --- a/src/_store/networks.module.js +++ b/src/_store/networks.module.js @@ -58,7 +58,7 @@ const actions = { .then( plan => { if (accountPlan.forkHost && accountPlan.forkHost !== '') { - networkService.forkNetwork(userId, plan.name, accountPlan.forkHost, cloud, region, exactRegion, messages, errors) + networkService.forkNetwork(userId, plan.name, accountPlan.forkHost, accountPlan.adminEmail, cloud, region, exactRegion, messages, errors) .then( newNodeNotification => commit('addPlanAndStartNetworkSuccess', newNodeNotification), error => commit('addPlanSuccessStartNetworkFailure', error)