Returning in middleware
Hi, I'm just getting started with TanStack Start. Right now I'm trying to do something like:
but this gives a type error and doesn't seem to work.
How do I return in a middleware? Or should I be using something else for this?
2 Replies
fascinating-indigo•6mo ago
I think with the middleware you have to return with next().
You will pass the json as part of the context.
or with what you are trying to do. Throw an error instead
optimistic-gold•6mo ago
you can also do