Cleaning up, adding readme and images, genre filter

This commit is contained in:
Mark Cooper 2021-08-19 17:29:36 -05:00
parent 53e46ff54d
commit 307b5b83a9
25 changed files with 269 additions and 65 deletions

View file

@ -28,6 +28,8 @@ class ApiController {
this.router.delete('/user/audiobook/:id', this.resetUserAudiobookProgress.bind(this))
this.router.post('/authorize', this.authorize.bind(this))
this.router.get('/genres', this.getGenres.bind(this))
}
find(req, res) {
@ -139,5 +141,11 @@ class ApiController {
this.emitter('user_updated', req.user.toJSONForBrowser())
res.sendStatus(200)
}
getGenres(req, res) {
res.json({
genres: this.db.getGenres()
})
}
}
module.exports = ApiController