mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 18:01:36 +03:00
84f387785a
refs #6301 - fix messages that joined with comma and therefore missed outputting version no - change `logInfo` to `logger` that has both an info and a warn method - add new warn method to errors - add a warn message everytime a migration (data or fixture) gets skipped over - update logger everywhere, including tests - update tests to check logger.warn gets called
17 lines
484 B
JavaScript
17 lines
484 B
JavaScript
var models = require('../../../models'),
|
|
ensureDefaultSettings;
|
|
|
|
/**
|
|
* ## Ensure Default Settings
|
|
* Wrapper around model.Settings.populateDefault, with logger
|
|
* @param {{info: logger.info, warn: logger.warn}} logger
|
|
* @returns {*}
|
|
*/
|
|
ensureDefaultSettings = function ensureDefaultSettings(logger) {
|
|
// Initialise the default settings
|
|
logger.info('Ensuring default settings');
|
|
return models.Settings.populateDefaults();
|
|
};
|
|
|
|
module.exports = ensureDefaultSettings;
|