Next 13 API responses just froze after build

This logic is supposed to return the current date when the end point is requested, it works fine on dev mode, but this endpoint response is frozen/cached after i run build, can someone clarify what is happening? I'm even doing the best i can on headers response and in client to turn this page like a getServerSideProps page
5 Replies
Brendonovich
Brendonovichβ€’2y ago
It might be because you don’t actually use request at all, not entirely sure tho
vitor markis 🎈
that's right, but i'm not sure how i'm supposed to use the request on that endpoint logic, there is nothing dynamic https://beta.nextjs.org/docs/routing/route-handlers#dynamic-route-handlers
Routing: Route Handlers | Next.js
Route Handlers are a new way to create custom request handlers for a given route. All HTTP methods are supported, including GET, POST, PUT, PATCH, DELETE, HEAD, and OPTIONS.
Brendonovich
Brendonovichβ€’2y ago
could you send back a piece of data from the request maybe? or i wonder if doing request.something; inside the function is enough to make next think it's dynamic
vitor markis 🎈
line 47 was all i need mate, we tricked him thanks dude πŸ§‘β€πŸš€
Unknown User
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server