Remove caas case in setup screen
This commit is contained in:
@@ -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));
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user