feat: Add Links stats
All checks were successful
Build Docker / BuildImage (push) Successful in 47s
Check Code Quality / RuffCheck (push) Successful in 59s

This commit is contained in:
2026-03-17 15:07:22 +11:00
parent bebf9e41e1
commit 8678711ab1
4 changed files with 62 additions and 35 deletions

View File

@@ -234,6 +234,23 @@ def api_immich_stats():
return jsonify(stats)
@app.route("/api/v1/links", methods=["GET"])
def api_links_stats():
"""
API endpoint to get the user's Links stats.
"""
user = session.get("user")
if not user:
return jsonify({"error": "Unauthorized"}), 401
from tools.links import get_links_stats
stats = get_links_stats(user["email"])
if "error" in stats:
return jsonify(stats), 500
return jsonify(stats)
# endregion