mirror of
https://github.com/wassname/talk.git
synced 2026-07-13 13:43:16 +08:00
fixed default setup
This commit is contained in:
+8
-1
@@ -13,6 +13,7 @@ const MODERATION_OPTIONS = require('../models/enum/moderation_options');
|
||||
const SettingsService = require('../services/settings');
|
||||
const SetupService = require('../services/setup');
|
||||
const UsersService = require('../services/users');
|
||||
const MigrationService = require('../services/migration');
|
||||
const errors = require('../errors');
|
||||
|
||||
// Register the shutdown criteria.
|
||||
@@ -51,6 +52,12 @@ const performSetup = async () => {
|
||||
if (program.defaults) {
|
||||
await SettingsService.init();
|
||||
|
||||
// Get the migrations to run.
|
||||
let migrations = await MigrationService.listPending();
|
||||
|
||||
// Perform all migrations.
|
||||
await MigrationService.run(migrations);
|
||||
|
||||
console.log('Settings created.');
|
||||
console.log('\nTalk is now installed!');
|
||||
|
||||
@@ -194,7 +201,7 @@ const performSetup = async () => {
|
||||
);
|
||||
};
|
||||
|
||||
// Start tthe setup process.
|
||||
// Start the setup process.
|
||||
performSetup()
|
||||
.then(() => {
|
||||
util.shutdown();
|
||||
|
||||
Reference in New Issue
Block a user