Remove auth on delete for now

This commit is contained in:
Jared Palmer 2023-06-02 14:28:05 -04:00
parent a7af3107b5
commit 01527d450b
4 changed files with 27 additions and 9 deletions

View file

@ -98,7 +98,7 @@ async function SidebarList({ session }: { session?: Session }) {
where: eq(chats.userId, session?.user?.email || ""),
}),
// @ts-ignore
[session?.user?.id || ""],
[session?.user?.email ?? ""],
{
revalidate: 3600,
}
@ -106,6 +106,12 @@ async function SidebarList({ session }: { session?: Session }) {
)();
return results.map((c) => (
<SidebarItem key={c.id} title={c.title} href={`/chat/${c.id}`} id={c.id} />
<SidebarItem
key={c.id}
title={c.title}
userId={session?.user?.email ?? ""}
href={`/chat/${c.id}`}
id={c.id}
/>
));
}