feat: Add JSON content-type to Bible API chapters endpoint
This commit is contained in:
@@ -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);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user