fixes, theming, branding
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user