fix(backend): use JSON-array form of contains() for jsonb shared_with
PostgrestFilterBuilder's .contains(column, value) serializes a JS
array as PostgreSQL array literal '{a,b}', which is the right shape
for text[] columns but invalid input for jsonb. Two of three call
sites (projects.ts and access.ts) passed bare arrays, causing every
GET /projects request to return 500 with 'invalid input syntax for
type json' on vanilla Postgres+PostgREST. The third site
(tabular.ts:107) already uses JSON.stringify([...]) - this commit
makes the other two match.
Tested by tracing the generated PostgREST URL: bare array produces
'cs.{smoke@test.local}' (4xx), JSON.stringify produces
'cs.["smoke@test.local"]' (200).
| Repository | Lef-F/mike |
|---|---|
| Author | Lef <Lef-F@users.noreply.github.com> |
| Authored | |
| Parents | 9f6dcfaf |
| Stats | 2 files changed , +2 , -2 |
| Part of | Backend jsonb shared_with contains() fix |
Capture this commit into my fork
Download a Markdown prompt that tells Claude how to port this
exact commit into your working tree. Run it via
claude -p < capture-commit-653d0550.md
from inside the repo you want the change in.