fix: groups can be created with empty names (#1267)

This commit is contained in:
Meier Lukas
2024-10-09 17:23:19 +02:00
committed by GitHub
parent efd06ea107
commit 98cf214aed

View File

@@ -6,7 +6,7 @@ import { byIdSchema } from "./common";
import { zodEnumFromArray } from "./enums";
const createSchema = z.object({
name: z.string().max(64),
name: z.string().trim().min(1).max(64),
});
const updateSchema = createSchema.merge(byIdSchema);