From 62972747866740dae84fc7b519fcedd731572329 Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Tue, 27 Nov 2018 18:06:14 +0100 Subject: feat(App): Add proxy support for services --- src/stores/ServicesStore.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/stores/ServicesStore.js') diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index cdb2db142..e22b343e7 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js @@ -143,6 +143,7 @@ export default class ServicesStore extends Store { // Actions @action async _createService({ recipeId, serviceData, redirect = true }) { const data = this._cleanUpTeamIdAndCustomUrl(recipeId, serviceData); + const response = await this.createServiceRequest.execute(recipeId, data)._promise; this.allServicesRequest.patch((result) => { @@ -150,6 +151,13 @@ export default class ServicesStore extends Store { result.push(response.data); }); + this.actions.settings.update({ + type: 'proxy', + data: { + [`${response.data.id}`]: data.proxy, + }, + }); + this.actionStatus = response.status || []; if (redirect) { @@ -222,6 +230,13 @@ export default class ServicesStore extends Store { }); } + this.actions.settings.update({ + type: 'proxy', + data: { + [`${serviceId}`]: data.proxy, + }, + }); + if (redirect) { this.stores.router.push('/settings/services'); gaEvent('Service', 'update', service.recipe.id); -- cgit v1.2.3-54-g00ecf