← back to Commercialrealestate
CRCP: default broker view lists ALL brokers again (Steve: ok if not CA); ?scope=ca keeps the California-only cut
9939cbd176cd648bd48a74e91c500f56384248ac · 2026-07-12 07:04:51 -0700 · Steve Abrams
Files touched
M package-lock.jsonM package.jsonM scripts/serve.js
Diff
commit 9939cbd176cd648bd48a74e91c500f56384248ac
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Sun Jul 12 07:04:51 2026 -0700
CRCP: default broker view lists ALL brokers again (Steve: ok if not CA); ?scope=ca keeps the California-only cut
---
package-lock.json | 4 ++--
package.json | 2 +-
scripts/serve.js | 11 +++++------
3 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index a60c0fd..b4e2882 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "commercialrealestate",
- "version": "0.7.0",
+ "version": "0.7.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "commercialrealestate",
- "version": "0.7.0",
+ "version": "0.7.1",
"dependencies": {
"better-sqlite3": "^12.11.1",
"express": "^4.22.2",
diff --git a/package.json b/package.json
index e4f8694..6e8fd49 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "commercialrealestate",
- "version": "0.7.0",
+ "version": "0.7.1",
"private": true,
"description": "LA County CRE investment explorer — multi-firm sourced, Census + assessor enriched, Qwen-analyzed",
"scripts": {
diff --git a/scripts/serve.js b/scripts/serve.js
index 925a9f4..448726d 100644
--- a/scripts/serve.js
+++ b/scripts/serve.js
@@ -179,12 +179,11 @@ app.get('/api/brokers/linkedin', async (req, res) => {
// ALL brokers/agents with EVERY field — backs the sortable/searchable broker grid+list (broker-grid.html).
app.get('/api/brokers/all', async (req, res) => {
if (!brokerdb) return res.json({ brokers: [], unavailable: true });
- // This is an LA commercial-RE database, but the Crexi feed pulled in out-of-state brokers.
- // Default view is California-scoped: state='CA' (confirmed by office address OR a CA-DRE
- // name match) PLUS still-unknown (no address AND no DRE match — likely CA, not proven).
- // Confirmed out-of-state brokers (state present and != 'CA') are excluded unless ?scope=all.
- const scope = String(req.query.scope || 'ca');
- const caFilter = scope === 'all' ? '' : `WHERE (b.state = 'CA' OR b.state IS NULL)`;
+ // Default lists ALL brokers (Steve: "list all, ok if not ca"). Geography is retained as a
+ // queryable label (b.state / b.dre_match) rather than a hard filter — pass ?scope=ca to get
+ // the California-only cut (state='CA' or still-unknown; hides the 22 confirmed out-of-state).
+ const scope = String(req.query.scope || 'all');
+ const caFilter = scope === 'ca' ? `WHERE (b.state = 'CA' OR b.state IS NULL)` : '';
try {
const rows = (await brokerdb.pool.query(
`SELECT b.id, b.name, f.name firm, b.agent_type, b.phone, b.email, b.website, b.linkedin,
← bce9ae6 auto-save: 2026-07-12T06:46:47 (4 files) — data/condos-redfi
·
back to Commercialrealestate
·
CRCP broker grid: organize all fields into categories (Ident 068be0a →