From bb1ba1dbc430acc38abdc0c068d3ff2a1d5464c9 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 7 Apr 2017 15:09:09 -0400 Subject: [PATCH] move finalizeCreate to scope of shareKey --- .../settingsCreateOrganizationController.js | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/app/settings/settingsCreateOrganizationController.js b/src/app/settings/settingsCreateOrganizationController.js index 0a6f036fd9..b76d89a45e 100644 --- a/src/app/settings/settingsCreateOrganizationController.js +++ b/src/app/settings/settingsCreateOrganizationController.js @@ -83,15 +83,15 @@ return apiService.organizations.post(paidRequest).$promise; }).then(finalizeCreate); } + + function finalizeCreate(result) { + $scope.model.card = null; + + $analytics.eventTrack('Created Organization'); + authService.addProfileOrganizationOwner(result, shareKey); + $state.go('backend.org.dashboard', { orgId: result.Id }).then(function () { + toastr.success('Your new organization is ready to go!', 'Organization Created'); + }); + } }; - - function finalizeCreate(result) { - $scope.model.card = null; - - $analytics.eventTrack('Created Organization'); - authService.addProfileOrganizationOwner(result, shareKey); - $state.go('backend.org.dashboard', { orgId: result.Id }).then(function () { - toastr.success('Your new organization is ready to go!', 'Organization Created'); - }); - } });