Fix nasssty typo

This commit is contained in:
Girish Ramakrishnan
2018-04-29 17:37:53 -07:00
parent 922ab3bde1
commit b5f8ca6c16
8 changed files with 168 additions and 168 deletions
+3 -3
View File
@@ -38,7 +38,7 @@ var assert = require('assert'),
sysinfo = require('./sysinfo.js'),
tokendb = require('./tokendb.js'),
users = require('./users.js'),
UserssError = users.UserssError,
UsersError = users.UsersError,
tld = require('tldjs'),
util = require('util');
@@ -241,8 +241,8 @@ function activate(username, password, email, displayName, ip, auditSource, callb
setTimeZone(ip, function () { }); // TODO: get this from user. note that timezone is detected based on the browser location and not the cloudron region
users.createOwner(username, password, email, displayName, auditSource, function (error, userObject) {
if (error && error.reason === UserssError.ALREADY_EXISTS) return callback(new SetupError(SetupError.ALREADY_PROVISIONED));
if (error && error.reason === UserssError.BAD_FIELD) return callback(new SetupError(SetupError.BAD_FIELD, error.message));
if (error && error.reason === UsersError.ALREADY_EXISTS) return callback(new SetupError(SetupError.ALREADY_PROVISIONED));
if (error && error.reason === UsersError.BAD_FIELD) return callback(new SetupError(SetupError.BAD_FIELD, error.message));
if (error) return callback(new SetupError(SetupError.INTERNAL_ERROR, error));
clients.get('cid-webadmin', function (error, result) {