REST API (routes/api.py): Three endpoints behind API key auth for programmatic image generation via presets — list presets, queue generation with optional overrides, and poll job status. Shared generation logic extracted from routes/presets.py into services/generation.py so both web UI and API use the same code path. Fallback covers: library index pages now show a random generated image at reduced opacity when no cover is assigned, instead of "No Image". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
40 lines
1.2 KiB
Python
40 lines
1.2 KiB
Python
def register_routes(app):
|
|
"""Register all route modules with the Flask app."""
|
|
from routes import queue_api
|
|
from routes import settings
|
|
from routes import characters
|
|
from routes import outfits
|
|
from routes import actions
|
|
from routes import styles
|
|
from routes import scenes
|
|
from routes import detailers
|
|
from routes import checkpoints
|
|
from routes import looks
|
|
from routes import presets
|
|
from routes import generator
|
|
from routes import quick
|
|
from routes import multi_char
|
|
from routes import gallery
|
|
from routes import strengths
|
|
from routes import transfer
|
|
from routes import api
|
|
|
|
queue_api.register_routes(app)
|
|
settings.register_routes(app)
|
|
characters.register_routes(app)
|
|
outfits.register_routes(app)
|
|
actions.register_routes(app)
|
|
styles.register_routes(app)
|
|
scenes.register_routes(app)
|
|
detailers.register_routes(app)
|
|
checkpoints.register_routes(app)
|
|
looks.register_routes(app)
|
|
presets.register_routes(app)
|
|
generator.register_routes(app)
|
|
quick.register_routes(app)
|
|
multi_char.register_routes(app)
|
|
gallery.register_routes(app)
|
|
strengths.register_routes(app)
|
|
transfer.register_routes(app)
|
|
api.register_routes(app)
|