Add:Chapter editor, lookup chapters via audnexus, chapters table on audiobook landing page #435

This commit is contained in:
advplyr 2022-05-10 17:03:41 -05:00
parent 095f49824e
commit cc1181b301
16 changed files with 613 additions and 108 deletions

View file

@ -225,6 +225,15 @@ class MiscController {
res.json(author)
}
async findChapters(req, res) {
var asin = req.query.asin
var chapterData = await this.bookFinder.findChapters(asin)
if (!chapterData) {
return res.json({ error: 'Chapters not found' })
}
res.json(chapterData)
}
authorize(req, res) {
if (!req.user) {
Logger.error('Invalid user in authorize')