Homepage JSON returns databases as a list

/.json previously returned databases as an object keyed by database
name, unlike /-/databases.json and every other collection in the API.
It now returns a list of database objects. The HTML template already
consumed the list. This endpoint remains undocumented.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GrHZSypDfMnym1tM5XJAFZ
This commit is contained in:
Claude 2026-07-04 16:45:19 +00:00
commit 5cb2bc6909
No known key found for this signature in database
4 changed files with 17 additions and 13 deletions

View file

@ -156,10 +156,12 @@ Endpoints disagree about the success envelope:
### 2a. Collection representations disagree (P2)
- Homepage `/.json` returns `databases` as an **object keyed by name**
- ~~Homepage `/.json` returns `databases` as an **object keyed by name**
(index.py:147-161); `/-/databases.json` returns an **array**; the database
page returns `tables` as an array. Choose arrays-of-objects everywhere
(objects-keyed-by-name break when names need ordering or pagination).
(objects-keyed-by-name break when names need ordering or pagination).~~
**Done** — the homepage returns a list, matching `/-/databases.json`.
The homepage JSON remains deliberately undocumented.
- ~~Insert/upsert with `return: true` respond with `rows` (plural, list); row
update with `return: true` responds with `row` (singular, object)
(views/row.py:837-844). Pick one (`rows` everywhere, even for one row,