Briefing granulaire, pistes rapides puis enrichissement async, layout persisté v5, suggestions agents, intégration Gmail et navigation sidebar alignée sur /home. Co-authored-by: Cursor <cursoragent@cursor.com>
22 lines
674 B
TypeScript
22 lines
674 B
TypeScript
import { NextRequest, NextResponse } from 'next/server'
|
|
import { auth } from '@/auth'
|
|
import { agentSuggestionService } from '@/lib/ai/services/agent-suggestion.service'
|
|
|
|
export async function POST(
|
|
_request: NextRequest,
|
|
{ params }: { params: Promise<{ id: string }> },
|
|
) {
|
|
const session = await auth()
|
|
if (!session?.user?.id) {
|
|
return NextResponse.json({ error: 'Unauthorized' }, { status: 401 })
|
|
}
|
|
|
|
const { id } = await params
|
|
const result = await agentSuggestionService.dismiss(session.user.id, id)
|
|
if (!result) {
|
|
return NextResponse.json({ error: 'Suggestion introuvable' }, { status: 404 })
|
|
}
|
|
|
|
return NextResponse.json({ success: true })
|
|
}
|