fix: exclude trashed notes from notebook counts + wire up trash restore/delete
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 39s
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 39s
- Add trashedAt: null filter to notebook note count queries in /api/notebooks - Pass isTrashView, onRestore, onPermanentDelete from NoteCard to NoteActions - Implement handleRestore and handlePermanentDelete in NoteCard Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -21,7 +21,7 @@ export async function GET(request: NextRequest) {
|
||||
orderBy: { name: 'asc' }
|
||||
},
|
||||
_count: {
|
||||
select: { notes: { where: { isArchived: false } } }
|
||||
select: { notes: { where: { isArchived: false, trashedAt: null } } }
|
||||
}
|
||||
},
|
||||
orderBy: { order: 'asc' }
|
||||
@@ -82,7 +82,7 @@ export async function POST(request: NextRequest) {
|
||||
include: {
|
||||
labels: true,
|
||||
_count: {
|
||||
select: { notes: { where: { isArchived: false } } }
|
||||
select: { notes: { where: { isArchived: false, trashedAt: null } } }
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user