caas: migrate -> change_plan

This commit is contained in:
Girish Ramakrishnan
2017-12-09 08:42:15 +05:30
parent 6dec02e1bd
commit 7d0cf1a754
5 changed files with 17 additions and 7 deletions

View File

@@ -828,11 +828,11 @@ angular.module('Application').service('Client', ['$http', 'md5', 'Notification',
}).error(defaultErrorHandler(callback));
};
Client.prototype.migrate = function (options, password, callback) {
Client.prototype.changePlan = function (options, password, callback) {
var data = options;
data.password = password;
post('/api/v1/caas/migrate', data).success(function(data, status) {
post('/api/v1/caas/change_plan', data).success(function(data, status) {
if (status !== 202 || typeof data !== 'object') return callback(new ClientError(status, data));
callback(null, data);
}).error(defaultErrorHandler(callback));

View File

@@ -96,7 +96,7 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
region: $scope.currentRegionSlug
};
Client.migrate(options, $scope.planChange.password, function (error) {
Client.changePlan(options, $scope.planChange.password, function (error) {
$scope.planChange.busy = false;
if (error) {