Add ability to register a Cloudron with a setupToken only
This commit is contained in:
@@ -3495,11 +3495,24 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
||||
});
|
||||
};
|
||||
|
||||
Client.prototype.registerCloudronWithSetupToken = function (setupToken, callback) {
|
||||
var data = {
|
||||
setupToken: setupToken
|
||||
};
|
||||
|
||||
post('/api/v1/appstore/register_cloudron_with_setup_token', data, null, function (error, data, status) {
|
||||
if (error) return callback(error);
|
||||
if (status !== 201) return callback(new ClientError(status, data));
|
||||
|
||||
callback(null);
|
||||
});
|
||||
};
|
||||
|
||||
Client.prototype.registerCloudron = function (email, password, totpToken, signup, callback) {
|
||||
var data = {
|
||||
email: email,
|
||||
password: password,
|
||||
signup: signup,
|
||||
signup: signup
|
||||
};
|
||||
|
||||
if (totpToken) data.totpToken = totpToken;
|
||||
|
||||
Reference in New Issue
Block a user