Move client TYPE_* to clients.js

This commit is contained in:
Johannes Zellner
2016-06-03 15:05:00 +02:00
parent 41b324eb2d
commit 226537de04
10 changed files with 28 additions and 35 deletions

View File

@@ -30,7 +30,6 @@ var apps = require('./apps.js'),
assert = require('assert'),
async = require('async'),
backups = require('./backups.js'),
clientdb = require('./clientdb.js'),
clients = require('./clients.js'),
config = require('./config.js'),
constants = require('./constants.js'),
@@ -231,7 +230,7 @@ function activate(username, password, email, displayName, ip, auditSource, callb
if (error && error.reason === UserError.BAD_FIELD) return callback(new CloudronError(CloudronError.BAD_FIELD, error.message));
if (error) return callback(new CloudronError(CloudronError.INTERNAL_ERROR, error));
clients.getByAppIdAndType('webadmin', clientdb.TYPE_ADMIN, function (error, result) {
clients.getByAppIdAndType('webadmin', clients.TYPE_ADMIN, function (error, result) {
if (error) return callback(new CloudronError(CloudronError.INTERNAL_ERROR, error));
// Also generate a token so the admin creation can also act as a login