feat(Notes): associate notes with tasks and enhance note management
- Added taskId field to Note model for associating notes with tasks. - Updated API routes to handle taskId in note creation and updates. - Enhanced NotesPageClient to manage task associations within notes. - Integrated task selection in MarkdownEditor for better user experience. - Updated NotesService to map task data correctly when retrieving notes.
This commit is contained in:
@@ -46,7 +46,7 @@ export async function POST(request: Request) {
|
||||
}
|
||||
|
||||
const body = await request.json();
|
||||
const { title, content, tags } = body;
|
||||
const { title, content, taskId, tags } = body;
|
||||
|
||||
if (!title || !content) {
|
||||
return NextResponse.json(
|
||||
@@ -59,6 +59,7 @@ export async function POST(request: Request) {
|
||||
title,
|
||||
content,
|
||||
userId: session.user.id,
|
||||
taskId,
|
||||
tags,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user