From c42aa7c806d421e3285e253477bd3512a8be2c2d Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Tue, 6 Aug 2019 10:03:12 +0200 Subject: [PATCH] Remove caas case in setup screen --- src/js/client.js | 7 ++----- src/js/setup.js | 9 ++------- src/setup.html | 9 --------- 3 files changed, 4 insertions(+), 21 deletions(-) diff --git a/src/js/client.js b/src/js/client.js index 3009722b7..5cce3f8ac 100644 --- a/src/js/client.js +++ b/src/js/client.js @@ -1065,7 +1065,7 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N }); }; - Client.prototype.createAdmin = function (username, password, email, displayName, setupToken, callback) { + Client.prototype.createAdmin = function (username, password, email, displayName, callback) { var that = this; var data = { @@ -1075,10 +1075,7 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N displayName: displayName }; - var query = ''; - if (setupToken) query = '?setupToken=' + setupToken; - - post('/api/v1/cloudron/activate' + query, data, null, function (error, data, status) { + post('/api/v1/cloudron/activate', data, null, function (error, data, status) { if (error) return callback(error); if (status !== 201) return callback(new ClientError(status, data)); diff --git a/src/js/setup.js b/src/js/setup.js index cf7dd1f3e..1bc001560 100644 --- a/src/js/setup.js +++ b/src/js/setup.js @@ -19,13 +19,12 @@ app.controller('SetupController', ['$scope', '$http', 'Client', function ($scope $scope.error = null; $scope.provider = ''; $scope.apiServerOrigin = ''; - $scope.setupToken = ''; $scope.activateCloudron = function () { $scope.busy = true; $scope.error = null; - Client.createAdmin($scope.account.username, $scope.account.password, $scope.account.email, $scope.account.displayName, $scope.setupToken, function (error) { + Client.createAdmin($scope.account.username, $scope.account.password, $scope.account.email, $scope.account.displayName, function (error) { if (error && error.statusCode === 400) { $scope.busy = false; $scope.error = { username: error.message }; @@ -51,7 +50,7 @@ app.controller('SetupController', ['$scope', '$http', 'Client', function ($scope } // if we are here from the ip first go to the real domain if already setup - if (status.provider !== 'caas' && status.adminFqdn && status.adminFqdn !== window.location.hostname) { + if (status.adminFqdn && status.adminFqdn !== window.location.hostname) { window.location.href = 'https://' + status.adminFqdn + '/setup.html'; return; } @@ -67,10 +66,6 @@ app.controller('SetupController', ['$scope', '$http', 'Client', function ($scope return; } - if (status.provider === 'caas') { - $scope.setupToken = search.setupToken; - } - $scope.account.email = search.email || $scope.account.email; $scope.account.displayName = search.displayName || $scope.account.displayName; $scope.account.requireEmail = !search.email; diff --git a/src/setup.html b/src/setup.html index 6fda5b45f..a335d6efd 100644 --- a/src/setup.html +++ b/src/setup.html @@ -37,15 +37,6 @@ -
-
-
-

No setup token provided.

- Please use the setup link for this cloudron. -
-
-
-