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
Build and Push Docker Image / build-and-push (push) Successful in 10m24s
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user