feat: add backend API endpoints for highlights and cross-references

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-12 07:07:21 +00:00
parent ea2a848f73
commit 7ca2076ca8
4 changed files with 162 additions and 93 deletions

View File

@@ -0,0 +1,33 @@
import { NextResponse } from 'next/server'
import { prisma } from '@/lib/db'
export const runtime = 'nodejs'
export async function GET(request: Request) {
try {
const { searchParams } = new URL(request.url)
const verseId = searchParams.get('verseId')
if (!verseId) {
return NextResponse.json(
{ error: 'verseId parameter required' },
{ status: 400 }
)
}
// For now, return empty cross-references
// TODO: Implement actual cross-reference lookup in Phase 2.1B
// This would require a cross_references table mapping verses to related verses
return NextResponse.json({
verseId,
references: []
})
} catch (error) {
console.error('Error fetching cross-references:', error)
return NextResponse.json(
{ error: 'Failed to fetch cross-references' },
{ status: 500 }
)
}
}