Migration change metadata folder from /books to /items, podcast data model updates, add podcast routes

This commit is contained in:
advplyr 2022-03-19 10:13:10 -05:00
parent 43bbfbfee3
commit f8d0384155
11 changed files with 153 additions and 89 deletions

View file

@ -14,6 +14,7 @@ const SeriesController = require('../controllers/SeriesController')
const AuthorController = require('../controllers/AuthorController')
const MediaEntityController = require('../controllers/MediaEntityController')
const SessionController = require('../controllers/SessionController')
const PodcastController = require('../controllers/PodcastController')
const MiscController = require('../controllers/MiscController')
const BookFinder = require('../finders/BookFinder')
@ -173,6 +174,12 @@ class ApiRouter {
this.router.post('/session/:id/sync', SessionController.middleware.bind(this), SessionController.sync.bind(this))
this.router.post('/session/:id/close', SessionController.middleware.bind(this), SessionController.close.bind(this))
//
// Podcast Routes
//
this.router.post('/podcasts', PodcastController.create.bind(this))
this.router.post('/podcasts/feed', PodcastController.getPodcastFeed.bind(this))
//
// Misc Routes
//
@ -180,7 +187,6 @@ class ApiRouter {
this.router.get('/download/:id', MiscController.download.bind(this))
this.router.patch('/settings', MiscController.updateServerSettings.bind(this)) // Root only
this.router.post('/purgecache', MiscController.purgeCache.bind(this)) // Root only
this.router.post('/getPodcastFeed', MiscController.getPodcastFeed.bind(this))
this.router.post('/authorize', MiscController.authorize.bind(this))
this.router.get('/search/covers', MiscController.findCovers.bind(this))
this.router.get('/search/books', MiscController.findBooks.bind(this))