Checks the playlist request bodies, for the playlist routes to answer a 400.
f
isCreatePlaylistRequest(obj: unknown): obj is CreatePlaylistRequest
Checks whether obj is a CreatePlaylistRequest with a title that
isn't blank, and a title and description within the VALIDATION limits. A
null description passes. Whether its category ids name playlist categories
is the playlist service's to check.
f
isReorderPlaylistRequest(obj: unknown): obj is ReorderPlaylistRequest
Checks whether obj is a ReorderPlaylistRequest. Whether its ids
match the playlist is reorderPlaylist's to check.
f
isUpdatePlaylistRequest(obj: unknown): obj is UpdatePlaylistRequest
Checks whether obj is an UpdatePlaylistRequest whose title, if
given, isn't blank, with a title and description within the VALIDATION
limits.
Usage
import * as mod from "api/validators/playlist.ts";