diff --git a/app/actions.ts b/app/actions.ts
index 26d4755..4ba7b6e 100644
--- a/app/actions.ts
+++ b/app/actions.ts
@@ -2,7 +2,7 @@
import { revalidatePath } from 'next/cache'
import { kv } from '@vercel/kv'
-import { currentUser } from '@clerk/nextjs'
+import { auth } from '@/auth'
import { type Chat } from '@/lib/types'
@@ -44,41 +44,50 @@ export async function getChat(id: string, userId: string) {
}
export async function removeChat({ id, path }: { id: string; path: string }) {
- const user = await currentUser()
+ const session = await auth<{ stuff: string }>()
- if (!user) {
+ if (!session) {
throw new Error('Unauthorized')
}
const uid = await kv.hget