fix: use PUT (not PATCH) for Supabase admin user_metadata update
Supabase Auth admin API requires PUT /auth/v1/admin/users/{id} to update
a user record — PATCH returns 405. Corrects the seed step that sets
kcar's user_type to 'platform_admin'.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
035ea17844
commit
9c32887407
@ -395,7 +395,7 @@ def seed() -> Dict[str, Any]:
|
||||
# Fix kcar's auth user_metadata so user_type is "platform_admin", not "teacher".
|
||||
# Without this, POST /user/init assigns kcar to the default school on first login.
|
||||
try:
|
||||
r = requests.patch(
|
||||
r = requests.put(
|
||||
f"{url}/auth/v1/admin/users/{KCAR_ID}",
|
||||
headers=headers,
|
||||
json={"user_metadata": {"user_type": "platform_admin"}},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user