fixes, theming, branding

This commit is contained in:
mikicvi
2025-09-26 22:16:34 +01:00
parent 22c462c61c
commit 220f999f19
24 changed files with 787 additions and 260 deletions
+6 -4
View File
@@ -5,7 +5,7 @@ import { bookings, settings } from '@/lib/db/schema';
import { eq, and } from 'drizzle-orm';
import { logActivity, ACTIONS, ENTITY_TYPES } from '@/lib/activity-logger';
export async function PATCH(request: NextRequest, { params }: { params: { id: string } }) {
export async function PATCH(request: NextRequest, context: { params: Promise<{ id: string }> }) {
try {
const session = await getSession();
if (!session) {
@@ -13,7 +13,8 @@ export async function PATCH(request: NextRequest, { params }: { params: { id: st
}
const { notes } = await request.json();
const bookingId = params.id;
const { id } = await context.params;
const bookingId = id;
// Check if booking exists and belongs to user
const existingBooking = await db
@@ -98,14 +99,15 @@ export async function PATCH(request: NextRequest, { params }: { params: { id: st
}
}
export async function DELETE(request: NextRequest, { params }: { params: { id: string } }) {
export async function DELETE(request: NextRequest, context: { params: Promise<{ id: string }> }) {
try {
const session = await getSession();
if (!session) {
return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
}
const bookingId = params.id;
const { id } = await context.params;
const bookingId = id;
// Check if booking exists and belongs to user
const existingBooking = await db