cleanup: audit complet — code mort supprimé, erreurs TS corrigées, i18n wizard ajouté
Supprimé: - memento-note/memento-note/ (dossier fantôme, 7 erreurs TS) - tiptap-subpage-extension.tsx + toutes ses références (feature retirée) Corrigé: - tiptap-columns-extension.tsx: PMNode import type → import value - study-plan/route.ts: title null → string conversion - csv/route.ts: paramètre implicit any Ajouté: - Section wizard.* complète (33 clés) dans fr.json + en.json - generalContinue + structuredViewsTagApplied dans fr/en
This commit is contained in:
@@ -33,7 +33,7 @@ export async function POST(request: NextRequest) {
|
||||
where: { notebookId, trashedAt: null, userId: session.user.id },
|
||||
select: { id: true, title: true },
|
||||
orderBy: { order: 'asc' },
|
||||
})
|
||||
}) as Array<{ id: string; title: string | null }>
|
||||
|
||||
if (notes.length === 0) {
|
||||
return NextResponse.json({ error: 'No notes found in notebook' }, { status: 400 })
|
||||
@@ -44,7 +44,8 @@ export async function POST(request: NextRequest) {
|
||||
select: { theme: true },
|
||||
})
|
||||
|
||||
const plan = await studyPlannerService.generate(notes, examDate)
|
||||
const notesForService = notes.map(n => ({ id: n.id, title: n.title ?? '' }))
|
||||
const plan = await studyPlannerService.generate(notesForService, examDate)
|
||||
|
||||
// Set reminders on notes based on the plan
|
||||
for (const day of plan.days) {
|
||||
|
||||
@@ -121,7 +121,7 @@ export async function POST(request: NextRequest) {
|
||||
|
||||
const headers = parseCSVLine(lines[0].replace(/^\uFEFF/, ''))
|
||||
const titleIdx = headers.findIndex(h => h.toLowerCase().includes('titre') || h.toLowerCase() === 'title')
|
||||
const dataRows = lines.slice(1).filter(l => l.trim())
|
||||
const dataRows = lines.slice(1).filter((l: string) => l.trim())
|
||||
|
||||
// Get or create schema
|
||||
let schema = await prisma.notebookSchema.findUnique({ where: { notebookId } })
|
||||
|
||||
Reference in New Issue
Block a user