feat: Add is_system column to notes and update task note handling for system notes

This commit is contained in:
Chop
2025-06-19 22:12:07 +02:00
parent d40af1ff31
commit 3762f2e6f8
5 changed files with 93 additions and 36 deletions

View File

@@ -28,7 +28,7 @@ export async function GET(req) {
// POST: Add a note to a task
export async function POST(req) {
try {
const { task_id, note } = await req.json();
const { task_id, note, is_system } = await req.json();
if (!task_id || !note) {
return NextResponse.json(
@@ -37,7 +37,7 @@ export async function POST(req) {
);
}
addNoteToTask(task_id, note);
addNoteToTask(task_id, note, is_system);
return NextResponse.json({ success: true });
} catch (error) {
console.error("Error adding task note:", error);