Skip to content

Commit

Permalink
fix: type mismatch in removeChat function (vercel#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
shadcn authored Feb 15, 2024
2 parents ce374ce + 18576f4 commit 69ca8fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ export async function removeChat({ id, path }: { id: string; path: string }) {
}
}

const uid = await kv.hget<string>(`chat:${id}`, 'userId')
//Convert uid to string for consistent comparison with session.user.id
const uid = String(await kv.hget(`chat:${id}`, 'userId'))

if (uid !== session?.user?.id) {
return {
Expand Down

0 comments on commit 69ca8fc

Please sign in to comment.