mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-11-16 22:01:17 +01:00
Fix socket events check user permissions for library items #4199
This commit is contained in:
1 parent
26309019e7
commit
bc1b99efd6
10 files changed
+69
-61
No files matched your search
@@ -152,10 +152,7 @@ class AuthorController {
|
||||
for (const libraryItem of libraryItems) {
|
||||
await libraryItem.saveMetadataFile()
|
||||
}
|
||||
SocketAuthority.emitter(
|
||||
'items_updated',
|
||||
libraryItems.map((li) => li.toOldJSONExpanded())
|
||||
)
|
||||
SocketAuthority.libraryItemsEmitter('items_updated', libraryItems)
|
||||
}
|
||||
|
||||
// Remove old author
|
||||
@@ -210,10 +207,7 @@ class AuthorController {
|
||||
}
|
||||
|
||||
if (libraryItems.length) {
|
||||
SocketAuthority.emitter(
|
||||
'items_updated',
|
||||
libraryItems.map((li) => li.toOldJSONExpanded())
|
||||
)
|
||||
SocketAuthority.libraryItemsEmitter('items_updated', libraryItems)
|
||||
}
|
||||
} else {
|
||||
numBooksForAuthor = await Database.bookAuthorModel.getCountForAuthor(req.author.id)
|
||||
|
||||
Reference in new issue
Block a user