fix: align root src/ enum values with packages/db schema
CI / Lint & Typecheck (push) Successful in 9s
CI / Test (push) Successful in 10s
CI / Build & Push Docker Images (push) Failing after 36s

Root src/routes/ used stale enum values (xlarge→extra_large,
smooth→silky, missing short/medium/silky from coatType) and
sizeCategory→petSizeCategory field name mismatch with the
pets table column.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-22 03:17:13 +00:00
committed by The Dogfather [agent]
parent 46f134a294
commit 9462915a66
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -193,8 +193,8 @@ bookRouter.post(
name: body.petName, name: body.petName,
species: body.petSpecies, species: body.petSpecies,
breed: body.petBreed ?? null, breed: body.petBreed ?? null,
coatType: (body.petCoatType ?? null) as "smooth" | "double" | "wire" | "curly" | "long" | "hairless" | null, coatType: (body.petCoatType ?? null) as "short" | "medium" | "long" | "double" | "wire" | "silky" | "curly" | "hairless" | null,
petSizeCategory: (body.petSizeCategory ?? null) as "small" | "medium" | "large" | "xlarge" | null, petSizeCategory: (body.petSizeCategory ?? null) as "small" | "medium" | "large" | "extra_large" | null,
}) })
.returning(); .returning();
const pet = petInserted[0]; const pet = petInserted[0];
+2 -2
View File
@@ -19,8 +19,8 @@ bufferRulesRouter.use("*", requireRole("manager"));
const createBufferRuleSchema = z.object({ const createBufferRuleSchema = z.object({
serviceId: z.string().uuid(), serviceId: z.string().uuid(),
sizeCategory: z.enum(["small", "medium", "large", "xlarge"]).optional(), sizeCategory: z.enum(["small", "medium", "large", "extra_large"]).optional(),
coatType: z.enum(["smooth", "double", "wire", "curly", "long", "hairless"]).optional(), coatType: z.enum(["short", "medium", "long", "double", "wire", "silky", "curly", "hairless"]).optional(),
bufferMinutes: z.number().int().positive(), bufferMinutes: z.number().int().positive(),
}); });
+2 -2
View File
@@ -24,8 +24,8 @@ const createPetSchema = z.object({
shampooPreference: z.string().max(500).optional(), shampooPreference: z.string().max(500).optional(),
specialCareNotes: z.string().max(2000).optional(), specialCareNotes: z.string().max(2000).optional(),
customFields: z.record(z.string(), z.string()).optional(), customFields: z.record(z.string(), z.string()).optional(),
sizeCategory: z.enum(["small", "medium", "large", "xlarge"]).optional(), petSizeCategory: z.enum(["small", "medium", "large", "extra_large"]).optional(),
coatType: z.enum(["smooth", "double", "wire", "curly", "long", "hairless"]).optional(), coatType: z.enum(["short", "medium", "long", "double", "wire", "silky", "curly", "hairless"]).optional(),
}); });
const updatePetSchema = createPetSchema.partial().omit({ clientId: true }); const updatePetSchema = createPetSchema.partial().omit({ clientId: true });