createServerFileRoute with different middleware for GET and POST
I am trying to create an app with an API that uses a different middleware for GET and POST. I am using the example code from the docs.
My code looks like this
I have removed the POST for brevity. When I use this code, I get the error
My code looks like this
I have removed the POST for brevity. When I use this code, I get the error
TypeError: handler is not a function. Can somebody explain what I am doing wrong because I feel that having different middlewares to control access to GET and POST endpoints should be a regular use-case.// TODO: Add redirect from api-routes to server-routes Server routes are a powerful feature of TanStack Start that allow you to create server-side endpoints in your application and are useful for hand...
