fix(email-themes): validate DELETE theme id as UUID

The DELETE route accepted params.id as any string, but the downstream
CUD delete handler validates it against a UUID schema. A malformed id
therefore failed inside the handler as a HexclaveAssertionError (500)
instead of a request-validation error. Constraining params.id to a UUID
keeps invalid input on the 400 path.
This commit is contained in:
Bilal Godil 2026-07-02 15:32:49 -07:00
parent 089934edde
commit 25aa3867b1

View File

@ -62,7 +62,7 @@ export const DELETE = createSmartRouteHandler({
tenancy: adaptSchema.defined(),
}).defined(),
params: yupObject({
id: yupString().defined(),
id: yupString().uuid().defined(),
}).defined(),
}),
response: yupObject({