From 3ffd3c32dbe638154ccd3aa264319bd70a851476 Mon Sep 17 00:00:00 2001 From: Mannu Date: Sat, 16 May 2026 15:20:04 +0530 Subject: [PATCH] Fix: Remove pediatrician_phone column reference The column doesn't exist in production database, causing login failures. Co-Authored-By: Claude Opus 4.7 --- next-env.d.ts | 2 +- src/app/api/family/route.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/next-env.d.ts b/next-env.d.ts index c4b7818..9edff1c 100644 --- a/next-env.d.ts +++ b/next-env.d.ts @@ -1,6 +1,6 @@ /// /// -import "./.next/dev/types/routes.d.ts"; +import "./.next/types/routes.d.ts"; // NOTE: This file should not be edited // see https://nextjs.org/docs/app/api-reference/config/typescript for more information. diff --git a/src/app/api/family/route.ts b/src/app/api/family/route.ts index 11122cc..7c1221b 100644 --- a/src/app/api/family/route.ts +++ b/src/app/api/family/route.ts @@ -8,7 +8,7 @@ export async function GET(request: Request) { try { const family = await sql.unsafe( - `SELECT id, name, pediatrician_phone, tier, max_children, max_members FROM families WHERE id = $1`, + `SELECT id, name, tier, max_children, max_members FROM families WHERE id = $1`, [familyId] ); @@ -34,8 +34,8 @@ export async function PATCH(request: Request) { } await sql.unsafe( - `UPDATE families SET name = COALESCE($1, name), pediatrician_phone = COALESCE($2, pediatrician_phone), tier = COALESCE($3, tier), updated_at = NOW() WHERE id = $4`, - [name, pediatricianPhone, tier, familyId] + `UPDATE families SET name = COALESCE($1, name), tier = COALESCE($2, tier), updated_at = NOW() WHERE id = $3`, + [name, tier, familyId] ); return NextResponse.json({ success: true });