INNER CODE UNIT · Python

list_collections

AnsahMohammad/shots-studio · legacy/web/app.py:142

def list_collections():
    return jsonify(
        {
            "collections": [
                {
                    "name": c.name,
                    "count": c.get_image_count(),
                    "preview": (
                        c.get_preview_image().path if c.get_preview_image() else None
                    ),
                }
                for c in collections
            ]
        }
    )


@app.route("/collections/create", methods=["POST"])

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…