mirror of
https://github.com/stack-auth/stack.git
synced 2026-07-20 21:29:36 +08:00
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:
parent
089934edde
commit
25aa3867b1
@ -62,7 +62,7 @@ export const DELETE = createSmartRouteHandler({
|
||||
tenancy: adaptSchema.defined(),
|
||||
}).defined(),
|
||||
params: yupObject({
|
||||
id: yupString().defined(),
|
||||
id: yupString().uuid().defined(),
|
||||
}).defined(),
|
||||
}),
|
||||
response: yupObject({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user