build: production build with Phase 1 2025 Bible Reader implementation complete
Includes all Phase 1 features: - Search-first navigation with auto-complete - Responsive reading interface (desktop/tablet/mobile) - 4 customization presets + full fine-tuning controls - Layered details panel with notes, bookmarks, highlights - Smart offline caching with IndexedDB and auto-sync - Full accessibility (WCAG 2.1 AA) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
38
app/api/payload/[...rest]/route.ts
Normal file
38
app/api/payload/[...rest]/route.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
import { getPayloadHMR } from '@payloadcms/next/utilities';
|
||||
import config from '@/payload.config';
|
||||
|
||||
let cachedPayload: any = null;
|
||||
|
||||
async function getPayload() {
|
||||
if (!cachedPayload) {
|
||||
cachedPayload = await getPayloadHMR({ config });
|
||||
}
|
||||
return cachedPayload;
|
||||
}
|
||||
|
||||
async function payloadHandler(req: Request) {
|
||||
const payload = await getPayload();
|
||||
return payload.handleRequest({
|
||||
req,
|
||||
});
|
||||
}
|
||||
|
||||
export async function GET(request: Request) {
|
||||
return payloadHandler(request);
|
||||
}
|
||||
|
||||
export async function POST(request: Request) {
|
||||
return payloadHandler(request);
|
||||
}
|
||||
|
||||
export async function PUT(request: Request) {
|
||||
return payloadHandler(request);
|
||||
}
|
||||
|
||||
export async function DELETE(request: Request) {
|
||||
return payloadHandler(request);
|
||||
}
|
||||
|
||||
export async function PATCH(request: Request) {
|
||||
return payloadHandler(request);
|
||||
}
|
||||
Reference in New Issue
Block a user