function addDumpToPlaylist
addDumpToPlaylist(
playlistId: string,
dumpId: string,
requestingUserId: string,
canModerate: boolean
): void

Puts a dump at the top of a playlist, for POST /api/playlists/:playlistId/dumps/:dumpId, and broadcasts playlist_dumps_updated. The followers of a public playlist are notified when the dump is public.

Parameters

playlistId: string
dumpId: string
requestingUserId: string
canModerate: boolean

Return Type

void

Throws

APIException

404 when there is no such playlist, or when the dump doesn't exist or is someone else's private dump, 403 when the user is neither the playlist's owner nor a moderator, 409 when the dump is already in it.

Usage

import { addDumpToPlaylist } from "api/services/playlist-service.ts";