mirror of
https://github.com/hexastack/hexabot
synced 2025-02-22 20:38:32 +00:00
fix: apply feedback
This commit is contained in:
parent
4d549b8710
commit
07e9147bb0
@ -10,6 +10,6 @@ import { ZodSchema } from 'zod';
|
|||||||
|
|
||||||
export function buildZodSchemaValidator<T>(zodSchema: ZodSchema<T>) {
|
export function buildZodSchemaValidator<T>(zodSchema: ZodSchema<T>) {
|
||||||
return (data: unknown) => {
|
return (data: unknown) => {
|
||||||
return zodSchema.safeParse(data);
|
return zodSchema.safeParse(data).success;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user