Ghost/core/server/data/migration/fixtures/settings.js
Hannah Wolfe 84f387785a Migration messaging improvements
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
2016-03-22 09:59:22 +00:00

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;