소스 검색

pass adminEmail in fork request, put json object in fork instead of url params

pull/73/head
Jonathan Cobb 4 년 전
부모
커밋
7ea124f8b4
2개의 변경된 파일10개의 추가작업 그리고 4개의 파일을 삭제
  1. +9
    -3
      src/_services/network.service.js
  2. +1
    -1
      src/_store/networks.module.js

+ 9
- 3
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) {


+ 1
- 1
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)


불러오는 중...
취소
저장