Fix authentication and Prisma query issues

This commit is contained in:
2026-01-08 21:35:55 +01:00
parent 15a95fb319
commit 6f4d758e5c
3 changed files with 6 additions and 6 deletions

View File

@@ -25,7 +25,7 @@ export async function getNotes(includeArchived = false) {
const notes = await prisma.note.findMany({
where: {
userId: session.user.id,
isArchived: includeArchived ? {} : { isArchived: false },
...(includeArchived ? {} : { isArchived: false }),
},
orderBy: [
{ isPinned: 'desc' },