aprs.me/lib/aprsme_web/controllers
Graham McIntire 564d21bb26
refactor: pattern-match in TimeHelpers.to_datetime and PageController
- TimeHelpers.to_datetime: `cond` with match?/2 guards becomes five
  function heads dispatched by input type — DateTime passes through,
  NaiveDateTime anchors to UTC, integer is a millisecond Unix epoch,
  binary tries ISO 8601, everything else is nil.
- PageController.health: the three-branch `cond` + inner `if db_healthy`
  becomes a chain of small respond_* helpers, each pattern-matched on a
  single axis (health_status, shutting_down?, db_healthy?). db_healthy?/0
  isolates the rescue.
- format_uptime splits the cond into four format_uptime_parts/4 clauses.

Adds tests for the PageController actions (health 200 / 503-draining,
ready, sitemap.xml, .well-known/api-catalog, status.json). Coverage
66.81 → 67.29%.
2026-04-23 13:58:42 -05:00
..
api/v1 chore(dialyzer): enable stricter flags and fix 97 resulting findings 2026-04-21 10:07:01 -05:00
page_html refactor to use external parser 2025-06-24 14:22:09 -05:00
error_html.ex Implement critical performance optimizations and error handling 2025-07-18 18:19:49 -05:00
error_json.ex refactor to use external parser 2025-06-24 14:22:09 -05:00
page_controller.ex refactor: pattern-match in TimeHelpers.to_datetime and PageController 2026-04-23 13:58:42 -05:00
page_html.ex refactor to use external parser 2025-06-24 14:22:09 -05:00
user_session_controller.ex refactor to use external parser 2025-06-24 14:22:09 -05:00