Closed Barbapapazes closed 1 year ago
Someone is attempting to deploy a commit to a Personal Account owned by @Atinux on Vercel.
@Atinux first needs to authorize it.
Name | Link |
---|---|
Latest commit | d6bf14e8cd66d64cfc4dd7719f99bd439006da47 |
Latest deploy log | https://app.netlify.com/sites/nuxt-todos-edge/deploys/648c20ed61d5c90008cb1ec7 |
Deploy Preview | https://deploy-preview-7--nuxt-todos-edge.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
Thanks to @thetutlage (thanks 🙏), schemas are now pre-compiled!
Made changes to actually have utils:
validateParams(event, schema)
validateQuery(event, schema)
validateBody(event, schema)
As well as v
object to not have to import vine each time.
Also added the throw createError
into it
Made changes to actually have utils:
validateParams(event, schema)
validateQuery(event, schema)
validateBody(event, schema)
As well as
v
object to not have to import vine each time.Also added the
throw createError
into it
I'm curious, could you explain why you choose to create validator in API instead using a schema? Is it to keep related code close orto be able to refector using a single function to handle errors? 🤔
Trying to keep each controller into its own file so when you delete it, you don't have to look elsewhere to find dead code.
Thanks! That's make a lot a sens!
Just added the support for pre-compiled schema so you can keep you schema elsewhere if you want, ex:
const createTodoValidator = v.compile(
v.object({
title: v.string().minLength(1).maxLength(100)
})
)
export default eventHandler(async (event) => {
const { title } = await validateBody(event, createTodoValidator)
// ...
})
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
nuxt-todos-edge | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 16, 2023 8:46am |
I had to revert this PR since VineJS does not seems to work on Edge runtime:
Hello,
@vinejs is just announce and it could be a better validation library (I never used zod but vine is extracted from Adonis and it's a great joy to use).