feat(fc2a): add /api/gallery endpoints (scroll, timeline, jump, image detail)
Thin Quart blueprint that delegates to GalleryService. Cursor-based scroll returns images + a date_groups summary so the SPA can render year-month headers without re-grouping client-side. Timeline returns year-month buckets for the sidebar jump nav. Jump returns a cursor positioned at a specific year-month so the gallery can scroll to historical periods. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
"""API blueprint registration."""
|
||||
"""API blueprint registration.
|
||||
|
||||
This module is imported by the Quart app factory; it just exposes the
|
||||
top-level `api_bp` for backward compatibility with FC-1's health route,
|
||||
and ALL_BLUEPRINTS for the factory to register sibling blueprints.
|
||||
"""
|
||||
|
||||
from quart import Blueprint
|
||||
|
||||
@@ -6,3 +11,9 @@ from . import health
|
||||
|
||||
api_bp = Blueprint("api", __name__, url_prefix="/api")
|
||||
api_bp.add_url_rule("/health", view_func=health.get_health, methods=["GET"])
|
||||
|
||||
|
||||
def all_blueprints() -> list[Blueprint]:
|
||||
from .gallery import gallery_bp
|
||||
# FC-2a additions: tags, settings, import_admin land in later tasks
|
||||
return [api_bp, gallery_bp]
|
||||
|
||||
Reference in New Issue
Block a user