feat: list a handle's repositories over /api
Completes Milestone 3's last step. The listing route calls `list_repos`
directly rather than going through `profile_for`, so a handle that does not
exist 404s on the use case's own `None` while a handle whose repositories the
caller may not see answers `[]` — which is the distinction `list_repos` was
given an `Option` for in the first place. Going via the profile would have made
that `None` unreachable and left the two surfaces disagreeing about what an
empty portfolio means.
`handle_param` is split out of `profile_for` so both surfaces parse the segment
the same way; a malformed handle stays a 404 rather than a bad request.
The response is a bare array to match `/api/users/{handle}` returning a bare
object, and `visibility` is spelled through `Visibility::as_str` rather than a
derived `Serialize` — the wire spelling is the web layer's promise, not
something a domain rename should be free to change.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JZwc7URWKVhkAuRTWiDmjAJamesPatrickGill authored 8 days agoparent0c5ca49Browse files
8622a05ce8d4de4191ea264cb1e0b0cf82eb53b6