fix: increase markdown transform word limit to 2000 + i18n errors
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 43s
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 43s
Same fix as reformulate — raise limit from 500 to 2000 and use i18n error keys instead of hardcoded English messages. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -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 }
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user