diff --git a/memento-note/app/api/ai/transform-markdown/route.ts b/memento-note/app/api/ai/transform-markdown/route.ts index bc1caee..77f81b6 100644 --- a/memento-note/app/api/ai/transform-markdown/route.ts +++ b/memento-note/app/api/ai/transform-markdown/route.ts @@ -22,14 +22,14 @@ export async function POST(request: NextRequest) { const wordCount = text.split(/\s+/).length if (wordCount < 10) { return NextResponse.json( - { error: 'Text must have at least 10 words to transform' }, + { errorKey: 'ai.wordCountMin', params: { min: 10, current: wordCount } }, { status: 400 } ) } - if (wordCount > 500) { + if (wordCount > 2000) { return NextResponse.json( - { error: 'Text must have maximum 500 words to transform' }, + { errorKey: 'ai.wordCountMax', params: { max: 2000, current: wordCount } }, { status: 400 } ) }