app.post(
'/',
validator('form', (value, c) => {
console.log("VALIDATOR")
const body = value['body'];
// if (!body || typeof body !== 'string') {
// return c.text('Invalid!', 400);
// }
// const parsed = customerFormSchema.safeParse(body);
// if (!parsed.success) {
// console.log(401)
// return c.text('Invalid!', 401);
// }
// // parsed.data for body;
return {
body
};
}),
...
app.post(
'/',
validator('form', (value, c) => {
console.log("VALIDATOR")
const body = value['body'];
// if (!body || typeof body !== 'string') {
// return c.text('Invalid!', 400);
// }
// const parsed = customerFormSchema.safeParse(body);
// if (!parsed.success) {
// console.log(401)
// return c.text('Invalid!', 401);
// }
// // parsed.data for body;
return {
body
};
}),
...