function setPlaylistImage
setPlaylistImage(
playlistId: string,
imageMime: string,
requestingUserId: string,
canModerate: boolean
): Playlist

Records the type of a playlist's new cover and broadcasts playlist_updated. The route must have written the file already, since clients fetch the cover as soon as they get the broadcast.

Parameters

playlistId: string
imageMime: string
requestingUserId: string
canModerate: boolean

Return Type

Throws

APIException

404 when there is no such playlist, 403 when the user is neither its owner nor a moderator.

Usage

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