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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user