mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-27 19:29:23 +02:00
Update:Refactor socket connection management into SocketAuthority
This commit is contained in:
parent
42e68edc65
commit
e2af33e136
22 changed files with 386 additions and 341 deletions
|
@ -1,4 +1,5 @@
|
|||
const Logger = require('../Logger')
|
||||
const SocketAuthority = require('../SocketAuthority')
|
||||
|
||||
class SeriesController {
|
||||
constructor() { }
|
||||
|
@ -38,7 +39,7 @@ class SeriesController {
|
|||
const hasUpdated = req.series.update(req.body)
|
||||
if (hasUpdated) {
|
||||
await this.db.updateEntity('series', req.series)
|
||||
this.emitter('series_updated', req.series)
|
||||
SocketAuthority.emitter('series_updated', req.series)
|
||||
}
|
||||
res.json(req.series)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue