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
absent-sapphire•3mo 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
fair-rose•3mo ago
you can also do