Remove activated event

Simply go ahead and create cron jobs
This commit is contained in:
Girish Ramakrishnan
2016-12-28 14:21:41 -08:00
parent 2ddb533ef2
commit e159cdad5b
2 changed files with 94 additions and 106 deletions
-4
View File
@@ -25,7 +25,6 @@ exports = module.exports = {
events: new (require('events').EventEmitter)(),
EVENT_ACTIVATED: 'activated',
EVENT_CONFIGURED: 'configured'
};
@@ -237,9 +236,6 @@ function activate(username, password, email, displayName, ip, auditSource, callb
tokendb.add(token, userObject.id, result.id, expires, '*', function (error) {
if (error) return callback(new CloudronError(CloudronError.INTERNAL_ERROR, error));
// EE API is sync. do not keep the REST API reponse waiting
process.nextTick(function () { exports.events.emit(exports.EVENT_ACTIVATED); });
eventlog.add(eventlog.ACTION_ACTIVATE, auditSource, { });
callback(null, { token: token, expires: expires });