How to identify a user ID when a server receives requests?
Are this steps correct?
or there is the method?
1. Receive requests
2. Get a session token in the cookie
3.
SELECT userId FROM session
WHERE token = "token"
environment:
Next.js App router Route Handlers
prisma
Solution:Jump to solution
I solved that!!
app/api/record/route.ts
```
import { headers } from "next/headers";...
1 Reply
Solution
I solved that!!
app/api/record/route.ts