mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
refs https://linear.app/tryghost/issue/CORE-35/refactor-route-and-redirect-settings - Made clear distinction around the methods that are exposed for the API use and for the internal use. Same pattern can be found in themese's and redirects module APIs
23 lines
742 B
JavaScript
23 lines
742 B
JavaScript
const routeSettings = require('./route-settings');
|
|
const SettingsLoader = require('./loader');
|
|
const ensureSettingsFile = require('./ensure-settings');
|
|
|
|
module.exports = {
|
|
init: async () => {
|
|
// Make sure that supported settings files are available
|
|
// inside of the `content/setting` directory
|
|
return ensureSettingsFile('routes.yaml');
|
|
},
|
|
|
|
loadRouteSettingsSync: SettingsLoader.loadSettingsSync,
|
|
loadRouteSettings: SettingsLoader.loadSettings,
|
|
getDefaultHash: routeSettings.getDefaultHash,
|
|
/**
|
|
* Methods used in the API
|
|
*/
|
|
api: {
|
|
setFromFilePath: routeSettings.setFromFilePath,
|
|
get: routeSettings.get,
|
|
getCurrentHash: routeSettings.getCurrentHash
|
|
}
|
|
};
|