0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00
ghost/core/frontend/services/routing
Hannah Wolfe 56af742a0b
Moved frontend reloading logic into bridge
- following on from removing api versioning logic from the frontend, it's possible to make more sense of what's happening
- this commit first introduces a proper jsdoc'd object that gets passed through the frontent load & reload flow
- that object contains the urlService and optionally our routeSettings processed from routes.yaml
- additionally, we were passing around a start boolean, which told the routerManager whether to just init, or init+start
- with this refactor, we always pass in the routeSettings when we want to do init+start, so we no longer need a boolean

- The refactor itself moves logic from the reload function in site.js and urlservice + routesettings fetching logic from routes.js
    into the reloadFrontend function in bridge.js.
- This makes it clearer to see what happens when we call reloadFrontend.
- This commit also makes it clearer to see what is happening with the route settings, where they are needed and why
- Ideally we'd also clean up the weird dupliated logic and somewhat unnecessary routes.js file
2022-04-28 15:37:09 +01:00
..
controllers Removed res.locals.apiVersion 2022-04-28 15:35:28 +01:00
middleware Renamed middlewares to middleware consistently 2021-11-16 15:51:47 +00:00
CollectionRouter.js Moved routing helpers to rendering service 2022-04-05 20:12:20 +01:00
config.js Removed versioned routing configs 2022-04-28 15:35:28 +01:00
EmailRouter.js Renamed middlewares to middleware consistently 2021-11-16 15:51:47 +00:00
index.js Moved routing helpers to rendering service 2022-04-05 20:12:20 +01:00
ParentRouter.js Extracted an explicit "filter" parameter in UrlGenerator constructor 2021-11-15 18:32:34 +04:00
PreviewRouter.js Renamed middlewares to middleware consistently 2021-11-16 15:51:47 +00:00
registry.js Removed event chain caused by settings date update 2021-10-19 07:29:09 +13:00
router-manager.js Moved frontend reloading logic into bridge 2022-04-28 15:37:09 +01:00
RSSRouter.js
StaticPagesRouter.js Renamed middlewares to middleware consistently 2021-11-16 15:51:47 +00:00
StaticRoutesRouter.js Renamed middlewares to middleware consistently 2021-11-16 15:51:47 +00:00
TaxonomyRouter.js Renamed middlewares to middleware consistently 2021-11-16 15:51:47 +00:00
UnsubscribeRouter.js