Fix authentication and Prisma query issues
This commit is contained in:
@@ -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' },
|
||||
|
||||
Reference in New Issue
Block a user