blomqma / next-rest-framework

Type-safe, self-documenting APIs for Next.js
https://next-rest-framework.vercel.app
Other
155 stars 20 forks source link

Fix App Route Query parameter #72

Closed mirko314 closed 1 year ago

mirko314 commented 1 year ago

Validating the input query schema (like seen below) was always returning an error, because the query parameters were not correctly read from the request. I am not sure if this fix is the correct way, happy if you take over this pr.

    input: {
      query: z.object({
        foo: z.string()
      })
    },
vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-rest-framework ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 7, 2023 6:35pm
next-rest-framework-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 7, 2023 6:35pm
blomqma commented 1 year ago

Thank you, your fix seems to work. Seems you created your PR from another remote, so I amended your fix with some test fixes to pass the CI and marked you as the co-author in https://github.com/blomqma/next-rest-framework/pull/73.