mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-19 16:42:17 +03:00
192ebb1739
refs #9178 - move tests as well
20 lines
575 B
JavaScript
20 lines
575 B
JavaScript
/**
|
|
* Settings Lib
|
|
* A collection of utilities for handling settings including a cache
|
|
*/
|
|
|
|
var SettingsModel = require('../../models/settings').Settings,
|
|
SettingsCache = require('./cache');
|
|
|
|
module.exports = {
|
|
init: function init() {
|
|
// Update the defaults
|
|
return SettingsModel.populateDefaults()
|
|
.then(function (settingsCollection) {
|
|
// Initialise the cache with the result
|
|
// This will bind to events for further updates
|
|
SettingsCache.init(settingsCollection);
|
|
});
|
|
}
|
|
};
|