function getPlaylistImageInfo
getPlaylistImageInfo(
playlistId: string,
requestingUserId: string | null
):
{ id: string; imageMime: string; isPublic: boolean; }
| undefined

Returns what GET /api/playlists/:playlistId/cover needs to serve a playlist's cover, or undefined when it has none. The route serves a private playlist's cover as private, so no shared cache keeps it.

Parameters

playlistId: string
requestingUserId: string | null

Return Type

{ id: string; imageMime: string; isPublic: boolean; }
| undefined

Throws

APIException

404 when there is no such playlist, or it is private and requestingUserId isn't its owner.

Usage

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