Closed Sujan1714 closed 7 months ago
Use this :
const { getUser } = getKindeServerSession()
const user = await getUser()
const userId = user?.id
if(!userId) return new Response('Unauthorized', {status: 401})
Use this :
const { getUser } = getKindeServerSession() const user = await getUser() const userId = user?.id if(!userId) return new Response('Unauthorized', {status: 401})
Thank you it's working
Can you help me to solve this error
Not related to the issue opened. Post separately for other issues.
.
src\app\api\message\route.ts