joschan21 / quill

Quill - A Modern SaaS-Platform Built With Next.js 13
1.91k stars 513 forks source link

Property 'id' does not exist on type 'KindeUser | null'.ts(2339) on src\app\api\message\route.ts #93

Closed Sujan1714 closed 7 months ago

Sujan1714 commented 7 months ago

src\app\api\message\route.ts

image

aradhyas8 commented 7 months ago

Use this :

const { getUser } =  getKindeServerSession()
 const user = await getUser()

 const userId = user?.id

 if(!userId) return new Response('Unauthorized', {status: 401})
Sujan1714 commented 7 months ago

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

Sujan1714 commented 7 months ago

Can you help me to solve this error

IMG_20240410_195919764_HDR

aradhyas8 commented 7 months ago

Not related to the issue opened. Post separately for other issues.

Sujan1714 commented 7 months ago

.