Checks the shape of the category request bodies, for the category routes to answer a 400. The category service checks the slug and name themselves.
f
isCreateCategoryRequest(obj: unknown): obj is CreateCategoryRequest
Checks whether obj has the fields of a CreateCategoryRequest.
f
isUpdateCategoryRequest(obj: unknown): obj is UpdateCategoryRequest
Checks whether obj has the fields of an UpdateCategoryRequest.
Usage
import * as mod from "api/validators/category.ts";