function assertCategoriesExist
assertCategoriesExist(
categoryIds: string[]
): void

Checks that every id in categoryIds names a category of kind, so that a dump is never filed under a playlist category, nor the other way round. The dump and playlist services run it before they write a row or store an uploaded file, so a bad id fails the request before anything is written.

Parameters

categoryIds: string[]

Return Type

void

Throws

APIException

400 when an id names no category of kind.

Usage

import { assertCategoriesExist } from "api/services/category-service.ts";