mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-03-13 02:19:46 +01:00
Server socket event fixes
This commit is contained in:
@@ -41,7 +41,7 @@ class SeriesController {
|
||||
const hasUpdated = req.series.update(req.body)
|
||||
if (hasUpdated) {
|
||||
await this.db.updateEntity('series', req.series)
|
||||
SocketAuthority.emitter('series_updated', req.series)
|
||||
SocketAuthority.emitter('series_updated', req.series.toJSON())
|
||||
}
|
||||
res.json(req.series)
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ class UserController {
|
||||
var newUser = new User(account)
|
||||
var success = await this.db.insertEntity('user', newUser)
|
||||
if (success) {
|
||||
SocketAuthority.adminEmitter('user_added', newUser)
|
||||
SocketAuthority.adminEmitter('user_added', newUser.toJSONForBrowser())
|
||||
res.json({
|
||||
user: newUser.toJSONForBrowser()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user