provide displayName in createAdmin route

This commit is contained in:
girish@cloudron.io
2016-01-19 23:58:08 -08:00
parent 613985a17c
commit abf0c81de4
2 changed files with 5 additions and 3 deletions

View File

@@ -437,11 +437,12 @@ angular.module('Application').service('Client', ['$http', 'md5', 'Notification',
}).error(defaultErrorHandler(callback));
};
Client.prototype.createAdmin = function (username, password, email, setupToken, callback) {
Client.prototype.createAdmin = function (username, password, email, displayName, setupToken, callback) {
var payload = {
username: username,
password: password,
email: email
email: email,
displayName: displayName
};
var that = this;

View File

@@ -43,6 +43,7 @@ app.service('Wizard', [ function () {
this.username = '';
this.email = '';
this.password = '';
this.displayName = '';
this.setupToken = null;
this.provider = null;
this.availableAvatars = [{
@@ -221,7 +222,7 @@ app.controller('StepController', ['$scope', '$route', '$location', 'Wizard', fun
app.controller('FinishController', ['$scope', '$location', 'Wizard', 'Client', function ($scope, $location, Wizard, Client) {
$scope.wizard = Wizard;
Client.createAdmin(Wizard.username, Wizard.password, Wizard.email, Wizard.setupToken, function (error) {
Client.createAdmin(Wizard.username, Wizard.password, Wizard.email, Wizard.displayName, Wizard.setupToken, function (error) {
if (error) {
console.error('Internal error', error);
window.location.href = '/error.html';