Use new registration API

This commit is contained in:
Girish Ramakrishnan
2019-05-04 21:57:42 -07:00
parent 8e08ac2ce1
commit 51521926e7
7 changed files with 52 additions and 224 deletions

View File

@@ -3,7 +3,7 @@
/* global angular:false */
/* global $:false */
angular.module('Application').controller('SettingsController', ['$scope', '$location', '$rootScope', '$timeout', 'Client', 'AppStore', function ($scope, $location, $rootScope, $timeout, Client, AppStore) {
angular.module('Application').controller('SettingsController', ['$scope', '$location', '$rootScope', '$timeout', 'Client', function ($scope, $location, $rootScope, $timeout, Client) {
Client.onReady(function () { if (!Client.getUserInfo().admin) $location.path('/'); });
$scope.client = Client;
@@ -314,7 +314,7 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
$scope.subscription = result;
// also reload the subscription on the main controller
$scope.$parent.updateSubscriptionStatus(function () {});
$scope.$parent.updateSubscriptionStatus();
// check again to give more immediate feedback once a subscription was setup
if (result.plan.id === 'free') $timeout(getSubscription, 10000);