mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-03 00:06:46 +01:00
Fix:User toJSONForPublic method
This commit is contained in:
parent
bcc7fcb645
commit
42050a5f17
@ -130,8 +130,8 @@ class User {
|
|||||||
toJSONForPublic(sessions, libraryItems) {
|
toJSONForPublic(sessions, libraryItems) {
|
||||||
var userSession = sessions ? sessions.find(s => s.userId === this.id) : null
|
var userSession = sessions ? sessions.find(s => s.userId === this.id) : null
|
||||||
var session = null
|
var session = null
|
||||||
if (session) {
|
if (userSession) {
|
||||||
var libraryItem = libraryItems.find(li => li.id === session.libraryItemId)
|
var libraryItem = libraryItems.find(li => li.id === userSession.libraryItemId)
|
||||||
if (libraryItem) {
|
if (libraryItem) {
|
||||||
session = userSession.toJSONForClient(libraryItem)
|
session = userSession.toJSONForClient(libraryItem)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user