mirror of
https://github.com/zvx-echo6/recon.git
synced 2026-08-26 17:21:33 +00:00
cleanup: remove /api/address_book handlers (extraction #3 shadow)
Removes address_book_bp (lib/address_book_api.py: /api/address_book/lookup + /api/address_book/list) + its registration in lib/api.py. Edge-shadowed since extraction #3 — navi-contacts (:8423) serves /api/address_book/* on navi.echo6.co; no recon-side consumer (no template/JS reference). lib/address_book.py is KEPT — geocode.py (nickname short-circuit + annotation) and netsyms_api.py import it. NOT removed this PR: contacts_bp. The recon dashboard at /deleted-contacts (recon-product, stays) calls /api/contacts/<id>/{restore,restore-as,purge} via XHR, and recon.echo6.co proxies straight to recon:8420 (verified the Caddy block — no navi-contacts routing there). Removing contacts_bp would break those dashboard actions. Flagged for a decision; lib/contacts.py also stays (dashboard ContactsDB reads). See PR body. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c968497b94
commit
5565ce409e
2 changed files with 0 additions and 35 deletions
|
|
@ -1,31 +0,0 @@
|
|||
"""
|
||||
RECON Address Book API — Flask Blueprint.
|
||||
|
||||
GET /api/address_book/lookup?q=<query> — best match or 404
|
||||
GET /api/address_book/list — all entries
|
||||
"""
|
||||
|
||||
from flask import Blueprint, request, jsonify
|
||||
|
||||
from . import address_book
|
||||
|
||||
address_book_bp = Blueprint('address_book', __name__)
|
||||
|
||||
|
||||
@address_book_bp.route('/api/address_book/lookup')
|
||||
def api_address_book_lookup():
|
||||
q = request.args.get('q', '').strip()
|
||||
if not q:
|
||||
return jsonify({'error': 'Missing q parameter'}), 400
|
||||
|
||||
result = address_book.lookup(q)
|
||||
if result is None:
|
||||
return '', 404
|
||||
|
||||
return jsonify(result)
|
||||
|
||||
|
||||
@address_book_bp.route('/api/address_book/list')
|
||||
def api_address_book_list():
|
||||
entries = address_book.list_all()
|
||||
return jsonify(entries)
|
||||
|
|
@ -59,10 +59,6 @@ class _LargeZimRequest(_FlaskRequest):
|
|||
return super()._get_file_stream(total_content_length, content_type, filename, content_length)
|
||||
|
||||
app.request_class = _LargeZimRequest
|
||||
# ── Address Book Blueprint ──
|
||||
from .address_book_api import address_book_bp
|
||||
app.register_blueprint(address_book_bp)
|
||||
|
||||
# ── Contacts Blueprint ──
|
||||
from .contacts_api import contacts_bp
|
||||
app.register_blueprint(contacts_bp)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue