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:
33
app/api/bible/cross-references/route.ts
Normal file
33
app/api/bible/cross-references/route.ts
Normal 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 }
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user