X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Finitializers%2Finstaller.js;h=8c3148e79fc9576f476f74fc6280ca2c13ecb4ee;hb=f6a0754fdacf9b890292f1efc62a9035bceb454a;hp=974402094a168ce24d6f492147a5a25a42dffc8b;hpb=da4971c11f16b541804b5071d543166cd3954a98;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/initializers/installer.js b/server/initializers/installer.js index 974402094..8c3148e79 100644 --- a/server/initializers/installer.js +++ b/server/initializers/installer.js @@ -13,6 +13,7 @@ const constants = require('./constants') const logger = require('../helpers/logger') const peertubeCrypto = require('../helpers/peertube-crypto') +const Application = mongoose.model('Application') const Client = mongoose.model('OAuthClient') const User = mongoose.model('User') @@ -117,7 +118,9 @@ function createOAuthAdminIfNotExist (callback) { logger.info('Username: ' + username) logger.info('User password: ' + password) - return callback(null) + logger.info('Creating Application collection.') + const application = new Application({ mongoSchemaVersion: constants.LAST_MONGO_SCHEMA_VERSION }) + application.save(callback) }) }) }