From c968497b943ec5065139f93b5838d4906b87f605 Mon Sep 17 00:00:00 2001 From: malice Date: Sat, 23 May 2026 00:27:44 -0600 Subject: [PATCH] cleanup: remove /api/place handlers (extraction #5 shadow) (#11) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /api/place// and /api/place/wikidata/ are edge-shadowed since extraction #5 โ€” navi-places (:8425) serves both via nginx. Removes the two recon-side handlers + the now-unused `from .place_detail import get_place_detail, get_place_by_wikidata` import. NO modules deleted. place_detail.py is KEPT โ€” wiki_enrich_api.py (the /api/wiki-enrich endpoint, which stays; navi-places HTTP-consumes it) imports `lookup_wiki_index` from it. That transitively keeps its deps google_places.py, overture.py, osm_categories.py (all imported only by place_detail). This corrects Phase A #5 ยง3's "only lib/api.py imports place_detail" โ€” the wiki-enrich endpoint (added post-#5) is a second consumer. Co-authored-by: zvx-echo6 Co-authored-by: Claude Opus 4.7 (1M context) --- lib/api.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/lib/api.py b/lib/api.py index 1fbde76..d14068c 100644 --- a/lib/api.py +++ b/lib/api.py @@ -25,7 +25,6 @@ from werkzeug.utils import secure_filename from .utils import get_config, content_hash, clean_filename_to_title, derive_source_and_category, generate_download_url, setup_logging from .status import StatusDB from .deployment_config import get_deployment_config -from .place_detail import get_place_detail, get_place_by_wikidata from .landclass import lookup_landclass, format_summary logger = setup_logging('recon.api') @@ -1216,21 +1215,6 @@ def api_knowledge_stats(): return jsonify(_cache['knowledge_stats']) -@app.route('/api/place//') -def api_place_detail(osm_type, osm_id): - """Proxy place details from local Nominatim or Overpass API.""" - result, status = get_place_detail(osm_type, osm_id) - return jsonify(result), status - - -@app.route("/api/place/wikidata/") -def api_place_wikidata(wikidata_id): - """Fetch place details from Wikidata entity.""" - result, status = get_place_by_wikidata(wikidata_id) - return jsonify(result), status - - - @app.route('/api/landclass') def api_landclass(): """PAD-US land classification lookup for a point."""