feat: Add JSON content-type to Bible API chapters endpoint

This commit is contained in:
Adolfo Reyna
2026-02-25 18:13:32 -05:00
parent fd82643477
commit 989fdce883

View File

@@ -148,7 +148,8 @@ DB.getDB.then((DB) => {
router.get("/chapters/:chapterId", async (req, res) => { router.get("/chapters/:chapterId", async (req, res) => {
const chapterId = req.params.chapterId; const chapterId = req.params.chapterId;
const bibleId = req.query.bibleId || defaultBibleId; const bibleId = req.query.bibleId || defaultBibleId;
const bibles = await fetchAPI('bibles/' + bibleId + "/chapters/" + chapterId); const contentType = req.query['content-type'] ? `?content-type=${req.query['content-type']}` : '';
const bibles = await fetchAPI('bibles/' + bibleId + "/chapters/" + chapterId + contentType);
return res.json(bibles); return res.json(bibles);
}); });