Skip to content

Feature/low effort fixes#106

Draft
omarmorshedy wants to merge 3 commits into
masterfrom
feature/low-effort-fixes
Draft

Feature/low effort fixes#106
omarmorshedy wants to merge 3 commits into
masterfrom
feature/low-effort-fixes

Conversation

@omarmorshedy

Copy link
Copy Markdown
Contributor

No description provided.

The previous query used '.where('ends', '<=', end)' which only returned
bookings ending on or before the end date. This missed bookings that end
after the end date but still overlap the requested range.

Changed to '.where('ends', '>', start)' so all bookings ending after the
start of the requested range are returned. The overlap check in the
bookings route then correctly filters them.
… redirect

The POST /admin/slots/create route was sending requests to
/api/resource-types instead of /api/slots, and redirecting to
/admin/resource-types instead of /admin/slots. Both have been
corrected to match the intended functionality.
Moved the hardcoded session secret to an environment variable
(OPTIMISM_SESSION_SECRET) with the previous value as a fallback.
Hardcoded secrets in source code are a security risk.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant