Update:API endpoint for get all users to use minimal payload

This commit is contained in:
advplyr 2023-03-29 14:56:50 -05:00
parent d2e0844493
commit 575a162f8b
3 changed files with 11 additions and 9 deletions

View file

@ -339,10 +339,7 @@ class ApiRouter {
// Helper Methods
//
userJsonWithItemProgressDetails(user, hideRootToken = false) {
const json = user.toJSONForBrowser()
if (json.type === 'root' && hideRootToken) {
json.token = ''
}
const json = user.toJSONForBrowser(hideRootToken)
json.mediaProgress = json.mediaProgress.map(lip => {
const libraryItem = this.db.libraryItems.find(li => li.id === lip.libraryItemId)