From 98f8e5e28d4555dc60651f8d9b9c55ea2479f7e3 Mon Sep 17 00:00:00 2001 From: Kelly Date: Wed, 3 Dec 2025 20:41:29 -0700 Subject: [PATCH] feat(api): include dba_name in AZ stores API response MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add dba_name to DISPENSARY_COLUMNS for the /api/az/stores list endpoint and getDispensaryById for the single store endpoint. This allows the frontend to display DBA names (trade names) when available, falling back to the legal entity name. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- backend/src/dutchie-az/routes/index.ts | 2 +- backend/src/dutchie-az/services/discovery.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/src/dutchie-az/routes/index.ts b/backend/src/dutchie-az/routes/index.ts index 835ca3eb..4ec35763 100644 --- a/backend/src/dutchie-az/routes/index.ts +++ b/backend/src/dutchie-az/routes/index.ts @@ -23,7 +23,7 @@ import { crawlDispensaryProducts } from '../services/product-crawler'; // Explicit column list for dispensaries table (avoids SELECT * issues with schema differences) const DISPENSARY_COLUMNS = ` - id, name, slug, city, state, zip, address, latitude, longitude, + id, name, dba_name, slug, city, state, zip, address, latitude, longitude, menu_type, menu_url, platform_dispensary_id, website, provider_detection_data, created_at, updated_at `; diff --git a/backend/src/dutchie-az/services/discovery.ts b/backend/src/dutchie-az/services/discovery.ts index 496fbd9f..a283f5cb 100644 --- a/backend/src/dutchie-az/services/discovery.ts +++ b/backend/src/dutchie-az/services/discovery.ts @@ -342,6 +342,7 @@ export function mapDbRowToDispensary(row: any): Dispensary { id: row.id, platform: row.platform || 'dutchie', // keep platform as-is, default to 'dutchie' name: row.name, + dbaName: row.dbaName || row.dba_name, slug: row.slug, city: row.city, state: row.state, @@ -376,6 +377,7 @@ export async function getDispensaryById(id: number): Promise SELECT id, name, + dba_name AS "dbaName", slug, city, state,