mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-13 08:57:04 +02:00
Fix socket events check user permissions for library items #4199
This commit is contained in:
@ -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