@@ -49,10 +49,10 @@ const setupApiRoutes = async (router: Router) => {
49
49
const setupBrowserRoutes = async (router: Router, htmlRenderer: HtmlRenderer) => {
50
50
const contentService = new ContentService();
51
51
52
- router.get('/html/:contentId/:locale', async (req, res, next) => {
53
- const { contentId, locale } = req.params;
52
+ router.get('/html/:contentId/:locale/:versionId ', async (req, res, next) => {
53
+ const { contentId, locale, versionId } = req.params;
54
54
55
- const content = await contentService.fetchContent(contentId, locale);
55
+ const content = await contentService.fetchContent(contentId, locale, versionId );
56
56
if (!content) {
57
57
return next();
58
58
}
@@ -64,10 +64,10 @@ const setupBrowserRoutes = async (router: Router, htmlRenderer: HtmlRenderer) =>
64
64
return res.send(content.html);
65
65
});
66
66
67
- router.get('/:contentId/:locale', async (req, res, next) => {
68
- const { contentId, locale } = req.params;
67
+ router.get('/:contentId/:locale/:versionId ', async (req, res, next) => {
68
+ const { contentId, locale, versionId } = req.params;
69
69
70
- const content = await contentService.fetchContent(contentId, locale);
70
+ const content = await contentService.fetchContent(contentId, locale, versionId );
71
71
if (!content) {
72
72
return next();
73
73
}
0 commit comments