mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-02 07:43:11 +03:00
Made bootstrap module's API slightly more readable
refs https://linear.app/tryghost/issue/CORE-103/decouple-internal-frontend-code-from-url-module - It was hard to see straight away what methods the module exposes
This commit is contained in:
parent
dc4694d8d3
commit
0a9837ebcf
7
core/frontend/services/routing/bootstrap.js
vendored
7
core/frontend/services/routing/bootstrap.js
vendored
@ -29,7 +29,7 @@ let siteRouter;
|
||||
* @param {Object} options
|
||||
* @returns {ExpressRouter}
|
||||
*/
|
||||
module.exports.init = ({start = false, routerSettings, apiVersion}) => {
|
||||
const init = ({start = false, routerSettings, apiVersion}) => {
|
||||
debug('bootstrap init', start, apiVersion, routerSettings);
|
||||
|
||||
registry.resetAllRouters();
|
||||
@ -64,7 +64,7 @@ module.exports.init = ({start = false, routerSettings, apiVersion}) => {
|
||||
* @param {string} apiVersion
|
||||
* @param {object} routerSettings
|
||||
*/
|
||||
module.exports.start = (apiVersion, routerSettings) => {
|
||||
const start = (apiVersion, routerSettings) => {
|
||||
debug('bootstrap start', apiVersion, routerSettings);
|
||||
const RESOURCE_CONFIG = require(`./config/${apiVersion}`);
|
||||
|
||||
@ -112,3 +112,6 @@ module.exports.start = (apiVersion, routerSettings) => {
|
||||
|
||||
debug('Routes:', registry.getAllRoutes());
|
||||
};
|
||||
|
||||
module.exports.init = init;
|
||||
module.exports.start = start;
|
||||
|
Loading…
Reference in New Issue
Block a user