diff --git a/app/api/bookings/[id]/confirmation-pdf/route.ts b/app/api/bookings/[id]/confirmation-pdf/route.ts index d4467d1..81d6a1b 100644 --- a/app/api/bookings/[id]/confirmation-pdf/route.ts +++ b/app/api/bookings/[id]/confirmation-pdf/route.ts @@ -36,7 +36,7 @@ export async function GET( const pdfBuffer = await lexofficeService.getInvoicePDF(booking.lexofficeConfirmationId); - return new NextResponse(pdfBuffer, { + return new NextResponse(new Uint8Array(pdfBuffer), { status: 200, headers: { 'Content-Type': 'application/pdf', diff --git a/app/api/cron/process-pending-bookings/route.ts b/app/api/cron/process-pending-bookings/route.ts index 196ebaa..2c00510 100644 --- a/app/api/cron/process-pending-bookings/route.ts +++ b/app/api/cron/process-pending-bookings/route.ts @@ -2,7 +2,7 @@ import { NextRequest, NextResponse } from 'next/server'; import { prisma } from '@/lib/prisma'; import { AIService } from '@/lib/ai-service'; import { LexOfficeService } from '@/lib/lexoffice'; -import { getCalendarService } from '@/lib/nextcloud-calendar'; +import { nextcloudCalendar } from '@/lib/nextcloud-calendar'; /** * AUTO-WORKFLOW CRON-JOB @@ -48,7 +48,7 @@ export async function GET(request: NextRequest) { const aiService = new AIService(); const lexoffice = new LexOfficeService(); - const calendar = getCalendarService(); + const calendar = nextcloudCalendar; let processed = 0; let errors = 0;