function updateCategory
updateCategory(
id: string,
): Category

Applies req to category id, for PUT /api/categories/:id, and returns the category as it now is. Fields req leaves out keep their value.

Parameters

Return Type

Throws

APIException

404 when there is no such category, 400 when the new slug or name is invalid, 409 when either is taken within its kind.

Usage

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