fix(calendar): /auth/users path + Z-suffix appointment timestamps #65

Merged
YousifShkara merged 1 commit from fix/calendar-fetch-paths-and-tz-encoding into main 2026-06-05 09:59:06 +02:00
Owner

Two failures on /calendar:

GET /api/v1/users?per_page=100 returned 404. The mokosh-server users CRUD lives at /api/v1/auth/users (nested under the auth router); the SPA had been calling the wrong path.

GET /api/v1/calendar/appointments?from=...&to=... returned 400. DateTime::<Utc>::to_rfc3339() emits 2026-05-31T04:00:00+00:00, and the literal + in a query string URL-decodes to a space, so the server's chrono parser saw 2026-05-31T04:00:00 00:00 and rejected the request. Switch to to_rfc3339_opts(SecondsFormat::Secs, true) which emits the Z suffix and round-trips cleanly without percent-encoding.

Both bugs surfaced together because the calendar page issues both calls on first mount.

Two failures on `/calendar`: `GET /api/v1/users?per_page=100` returned 404. The mokosh-server users CRUD lives at `/api/v1/auth/users` (nested under the auth router); the SPA had been calling the wrong path. `GET /api/v1/calendar/appointments?from=...&to=...` returned 400. `DateTime::<Utc>::to_rfc3339()` emits `2026-05-31T04:00:00+00:00`, and the literal `+` in a query string URL-decodes to a space, so the server's chrono parser saw `2026-05-31T04:00:00 00:00` and rejected the request. Switch to `to_rfc3339_opts(SecondsFormat::Secs, true)` which emits the `Z` suffix and round-trips cleanly without percent-encoding. Both bugs surfaced together because the calendar page issues both calls on first mount.
fix(calendar): /auth/users path + Z-suffix appointment timestamps
All checks were successful
Create release / Create release from merged PR (pull_request) Has been skipped
Check / clippy + fmt + tests (pull_request) Successful in 1m11s
e5a92695fa
Two failures on `/calendar`:

`GET /api/v1/users?per_page=100` returned 404. The mokosh-server users CRUD lives at `/api/v1/auth/users` (nested under the auth router); the SPA had been calling the wrong path.

`GET /api/v1/calendar/appointments?from=...&to=...` returned 400. `DateTime::<Utc>::to_rfc3339()` emits `2026-05-31T04:00:00+00:00`, and the literal `+` in a query string URL-decodes to a space, so the server's chrono parser saw `2026-05-31T04:00:00 00:00` and rejected the request. Switch to `to_rfc3339_opts(SecondsFormat::Secs, true)` which emits the `Z` suffix and round-trips cleanly without percent-encoding.

Both bugs surfaced together because the calendar page issues both calls on first mount.
YousifShkara deleted branch fix/calendar-fetch-paths-and-tz-encoding 2026-06-05 09:59:06 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
psa-systems/mokosh-apps!65
No description provided.