fix: resolve guest booking failures from router conflict, reservation self-block, and closed-day miscalculation

- backend/main.go: Flatten /bookings/* sub-Route to explicit paths to prevent
  RequireAuth middleware from bleeding into OptionalAuth POST /bookings
- backend/handlers/scheduling/time-blockers.go: Exclude RESERVATION:* entries
  from GetTimeBlockersInRange so overlap checks dont reject the users own
  reservation before CreateBookingHandler can delete it
- local-dev-2.sh: Fix open_day to skip Saturday (6) not Monday (1), matching
  working_hours schema; move guest booking dates to +16/+20/+22 days beyond
  the upcoming loop range; add reserve-then-book step mirroring frontend flow
This commit is contained in:
2026-04-30 16:06:51 +01:00
parent 819a7afb76
commit 7b396b7a9d
3 changed files with 70 additions and 40 deletions
@@ -196,6 +196,7 @@ func GetTimeBlockersInRange(ctx context.Context, start, end time.Time) ([]TimeBl
SELECT id, start_time, duration_minutes, description, cron_expression, created_at, created_by
FROM time_blockers
WHERE cron_expression IS NULL
AND description NOT LIKE 'RESERVATION:%'
AND start_time >= $1 AND start_time <= $2
ORDER BY start_time
`, start, end)