Fix JSONB contains() syntax for shared_with email lookup
supabase-js .contains(col, JSArray) emits PostgREST native-array literal
syntax (cs.{val1,val2}), not JSON. For our JSONB shared_with column this
makes Postgres try to parse the array literal as JSON and fail with
"invalid input syntax for type json", returning a 500 from any GET /projects
or access.ts call when the user's email is set.
tabular.ts:107 already used the JSON.stringify form. Apply the same fix in
projects.ts:34 and access.ts:138.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
| Repository | easterbrooka/mike |
|---|---|
| Author | andrew <andrew@wrmk.co.nz> |
| Authored | |
| Parents | 5bc4211a |
| Stats | 2 files changed , +2 , -2 |
| Part of | JSONB shared_with email lookup 500 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-03baa4c7.md
from inside the repo you want the change in.