0
Fork 0
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:
Naz 2021-10-06 21:23:42 +02:00
parent f3efd9834a
commit 551ecb2b40

View file

@ -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 previewRouter = new PreviewRouter(RESOURCE_CONFIG);
siteRouter.mountRouter(previewRouter.router());