mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Fixed 404 error when email only posts have been enabled
refs 74f00bae1e
refs TryGhost/Team#990
refs https://linear.app/tryghost/issue/CORE-25
- In the refed commit the 'emailOnlyPost' flag check has been moved to a dynamic runtime check and the code controlling the route mounting during the boot time wasn't cleaned up.
This commit is contained in:
parent
f3efd9834a
commit
551ecb2b40
1 changed files with 3 additions and 5 deletions
8
core/frontend/services/routing/bootstrap.js
vendored
8
core/frontend/services/routing/bootstrap.js
vendored
|
@ -73,11 +73,9 @@ module.exports.start = (apiVersion, routerSettings) => {
|
|||
siteRouter.mountRouter(unsubscribeRouter.router());
|
||||
registry.setRouter('unsubscribeRouter', unsubscribeRouter);
|
||||
|
||||
if (labs.isSet('emailOnlyPosts')) {
|
||||
const emailRouter = new EmailRouter(RESOURCE_CONFIG);
|
||||
siteRouter.mountRouter(emailRouter.router());
|
||||
registry.setRouter('emailRouter', emailRouter);
|
||||
}
|
||||
const emailRouter = new EmailRouter(RESOURCE_CONFIG);
|
||||
siteRouter.mountRouter(emailRouter.router());
|
||||
registry.setRouter('emailRouter', emailRouter);
|
||||
|
||||
const previewRouter = new PreviewRouter(RESOURCE_CONFIG);
|
||||
siteRouter.mountRouter(previewRouter.router());
|
||||
|
|
Loading…
Add table
Reference in a new issue