feat(fc2a): add /api/import admin endpoints
trigger enqueues a Celery scan_directory task and returns 202 with the celery task id (the actual scan happens asynchronously; status surfaces via /api/import/status and /api/system/stats). list_tasks supports status filter and cursor pagination. retry-failed resets failed tasks to queued and re-enqueues. clear-completed deletes finished tasks older than the supplied age (used by the Settings UI's cleanup control). mode='deep' is explicitly rejected with 400 until FC-2d ships it; the frontend's UI in FC-2a only sends 'quick'. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,7 @@ api_bp.add_url_rule("/health", view_func=health.get_health, methods=["GET"])
|
||||
|
||||
def all_blueprints() -> list[Blueprint]:
|
||||
from .gallery import gallery_bp
|
||||
from .import_admin import import_admin_bp
|
||||
from .settings import settings_bp
|
||||
from .tags import tags_bp
|
||||
return [api_bp, gallery_bp, tags_bp, settings_bp]
|
||||
return [api_bp, gallery_bp, tags_bp, settings_bp, import_admin_bp]
|
||||
|
||||
Reference in New Issue
Block a user