Fix: Remove pediatrician_phone column reference
The column doesn't exist in production database, causing login failures. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
c65051cf7d
commit
3ffd3c32db
2 changed files with 4 additions and 4 deletions
2
next-env.d.ts
vendored
2
next-env.d.ts
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/// <reference types="next" />
|
||||
/// <reference types="next/image-types/global" />
|
||||
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.
|
||||
|
|
|
|||
|
|
@ -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 });
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue