feat(admin-tags): POST /api/admin/tags to create craft/cooperative tags

Admin-only route that validates a label + pool via zod, slugifies the
label, returns the existing tag if the slug already exists, otherwise
creates a new active Tag document.
This commit is contained in:
Jennie Robinson Faber 2026-05-21 17:51:01 +01:00
parent 4a05e91715
commit 384d3197ce
2 changed files with 45 additions and 0 deletions

View file

@ -383,6 +383,11 @@ export const tagSuggestionSchema = z.object({
pool: z.enum(['craft', 'cooperative'])
})
export const adminTagCreateSchema = z.object({
label: z.string().trim().min(1).max(100),
pool: z.enum(['craft', 'cooperative'])
})
// --- Board post / channel schemas ---
export const boardPostCreateSchema = z.object({