Fix find all playlist endpoint

This commit is contained in:
advplyr 2024-12-31 17:11:31 -06:00
parent 9785bc02ea
commit 777c59458d
2 changed files with 2 additions and 11 deletions

View File

@ -121,7 +121,7 @@ class PlaylistController {
/**
* @deprecated - Use /api/libraries/:libraryId/playlists
* This is not used by Abs web client or mobile apps
* TODO: Remove this endpoint or refactor it and make it the primary
* TODO: Remove this endpoint or make it the primary
*
* GET: /api/playlists
* Get all playlists for user
@ -130,7 +130,7 @@ class PlaylistController {
* @param {Response} res
*/
async findAllForUser(req, res) {
const playlistsForUser = await Database.playlistModel.getOldPlaylistsForUserAndLibrary(req.user.id, req.params.libraryId)
const playlistsForUser = await Database.playlistModel.getOldPlaylistsForUserAndLibrary(req.user.id)
res.json({
playlists: playlistsForUser
})

View File

@ -23,15 +23,6 @@ class PlaylistMediaItem extends Model {
this.mediaItem
}
static removeByIds(playlistId, mediaItemId) {
return this.destroy({
where: {
playlistId,
mediaItemId
}
})
}
getMediaItem(options) {
if (!this.mediaItemType) return Promise.resolve(null)
const mixinMethodName = `get${this.sequelize.uppercaseFirst(this.mediaItemType)}`