Lazy bookshelf

This commit is contained in:
advplyr 2021-11-28 19:36:44 -06:00
parent 3941da1144
commit 4587916c8e
11 changed files with 669 additions and 31 deletions

View file

@ -1,16 +1,11 @@
const Logger = require('../Logger')
class BookController {
constructor(db, emitter, clientEmitter, streamManager, coverController) {
this.db = db
this.emitter = emitter
this.clientEmitter = clientEmitter
this.streamManager = streamManager
this.coverController = coverController
}
constructor() { }
findAll(req, res) {
var audiobooks = []
if (req.query.q) {
audiobooks = this.db.audiobooks.filter(ab => {
return ab.isSearchMatch(req.query.q)