Fix leads API null handling
This commit is contained in:
@@ -23,12 +23,12 @@ export async function POST(request: NextRequest) {
|
||||
|
||||
const lead = {
|
||||
name: body.name,
|
||||
business_name: body.businessName || body.business_name,
|
||||
phone: body.phone,
|
||||
email: body.email,
|
||||
source: body.source,
|
||||
business_name: body.businessName || body.business_name || null,
|
||||
phone: body.phone || null,
|
||||
email: body.email || null,
|
||||
source: body.source || null,
|
||||
status: body.status || 'new',
|
||||
notes: body.notes,
|
||||
notes: body.notes || null,
|
||||
}
|
||||
|
||||
const { data, error } = await supabase
|
||||
|
||||
Reference in New Issue
Block a user