mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-25 20:15:41 +02:00
Update:Get all user playlists for library API endpoint performance improvement #2852
This commit is contained in:
parent
94400f7794
commit
1576164218
2 changed files with 95 additions and 59 deletions
|
@ -512,8 +512,7 @@ class LibraryController {
|
|||
* @param {*} res
|
||||
*/
|
||||
async getUserPlaylistsForLibrary(req, res) {
|
||||
let playlistsForUser = await Database.playlistModel.getPlaylistsForUserAndLibrary(req.user.id, req.library.id)
|
||||
playlistsForUser = await Promise.all(playlistsForUser.map(async (p) => p.getOldJsonExpanded()))
|
||||
let playlistsForUser = await Database.playlistModel.getOldPlaylistsForUserAndLibrary(req.user.id, req.library.id)
|
||||
|
||||
const payload = {
|
||||
results: [],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue