feat: redesign CMS and unify German admin UI
This commit is contained in:
@@ -38,7 +38,7 @@ export async function POST(request: Request, { params }: Args) {
|
||||
}
|
||||
|
||||
// The beforeChange hook on booking-requests re-checks for conflicts
|
||||
// (with an advisory lock) before allowing this to become "confirmed" —
|
||||
// (with an advisory lock) before allowing this to become "confirmed" -
|
||||
// the alternative slot may have been taken by someone else since it was
|
||||
// proposed.
|
||||
await payload.update({
|
||||
|
||||
@@ -16,7 +16,7 @@ export async function POST(request: Request, { params }: Args) {
|
||||
if (!user || user.collection !== "customers") {
|
||||
return NextResponse.json({ error: "Bitte melde dich an." }, { status: 401 });
|
||||
}
|
||||
// Cancelling is deliberately allowed regardless of verification status —
|
||||
// Cancelling is deliberately allowed regardless of verification status -
|
||||
// only creating/confirming a booking is a gated "protected" action.
|
||||
|
||||
return await withBookingTransaction(payload, `booking:${id}`, async (req) => {
|
||||
|
||||
@@ -67,7 +67,7 @@ export async function POST(request: Request) {
|
||||
const end = new Date(start.getTime() + offer.durationMinutes * 60_000);
|
||||
|
||||
// Re-validate the slot is actually free right now (defense against a
|
||||
// stale slot list) — the hard, race-safe check still runs again when
|
||||
// stale slot list) - the hard, race-safe check still runs again when
|
||||
// Anna confirms (see collections/BookingRequests.ts).
|
||||
const dayBounds = berlinDayBounds(start);
|
||||
return await withBookingTransaction(payload, dayBounds.key, async (req) => {
|
||||
|
||||
Reference in New Issue
Block a user