You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.
exportconstuseMessage=query(// use zod or other input validation librariesz.object({name: z.string(),}),asyncfunction({ name }){// this.request is a `Request` instance <------------ this.request is not available herereturn{hello: "world, "+name};});
The text was updated successfully, but these errors were encountered:
hexcowboy
changed the title
Request: expose a req/res context for API implementation
feat: expose a req/res context for API implementation
Nov 10, 2022
Btw, make sure that you are passing a normal function and not an arrow function. Arrow function this behaves differently. Normal function works for me.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Currently I'm unable to authenticate user requests since doing so with NextAuth requires the
Request
andResponse
objects to check auth.I'd like to propose an API similar to this, exposing a
ctx
object:Additionally, the documentation is misleading:
The text was updated successfully, but these errors were encountered: