feat: implement user preference management with persistence, reactive CSS variables, and layout customization

This commit is contained in:
2026-08-21 10:25:00 +09:00
parent 8212f16d28
commit fa15956a90
23 changed files with 2915 additions and 1146 deletions
+10
View File
@@ -48,6 +48,16 @@ export async function POST(req: NextRequest) {
const list = await prisma.list.findFirst({ where: { id: listId, userId: session.user.id } });
if (!list) return NextResponse.json({ error: "List not found" }, { status: 404 });
// IDOR 방어: parentId가 지정된 경우, 부모 태스크가 현재 사용자의 소유인지 검증
if (parentId) {
const parentTask = await prisma.task.findFirst({
where: { id: parentId, userId: session.user.id },
});
if (!parentTask) {
return NextResponse.json({ error: "Parent task not found or forbidden" }, { status: 403 });
}
}
const count = await prisma.task.count({ where: { listId, parentId: parentId || null } });
const task = await prisma.task.create({
data: {