0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
ghost/core/server/settings/index.js

24 lines
685 B
JavaScript
Raw Normal View History

/**
* Settings Lib
* A collection of utilities for handling settings including a cache
* @TODO: eventually much of this logic will move into this lib
* For now we are providing a unified interface
*/
var SettingsModel = require('../models/settings').Settings,
SettingsAPI = require('../api').settings,
SettingsCache = require('./cache');
module.exports = {
init: function init() {
// Bind to events
SettingsCache.init();
// Update the defaults
return SettingsModel.populateDefaults()
.then(function () {
// Reset the cache
return SettingsAPI.updateSettingsCache();
});
}
};