fix(trash & sidebar): isolate trash view, sync list task counts in real-time, and fix restore/delete actions
Build and Push Docker Image / build-and-push (push) Successful in 10m24s

This commit is contained in:
2026-08-21 22:32:02 +09:00
parent baf13a069a
commit 4d1da38085
6 changed files with 75 additions and 14 deletions
+3 -2
View File
@@ -11,12 +11,13 @@ export async function GET(req: NextRequest) {
const { searchParams } = new URL(req.url);
const listId = searchParams.get("listId");
const showCompleted = searchParams.get("showCompleted") === "true";
const tagName = searchParams.get("tag");
const where: Record<string, unknown> = {
userId: session.user.id,
parentId: null,
...(listId ? { listId } : {}),
...(listId ? { listId, parentId: null } : tagName ? {} : { parentId: null }),
...(showCompleted ? {} : { completed: false }),
...(tagName ? { tags: { some: { tag: { name: tagName } } } } : {}),
};
const tasks = await prisma.task.findMany({