Finished @ROUTES.head("/api/assets/hash/{hash}")

This commit is contained in:
Jedrzej Kosinski
2026-01-15 21:13:34 -08:00
parent e5c1de4777
commit fab9b71f5d
2 changed files with 16 additions and 1 deletions

View File

@@ -25,7 +25,10 @@ def _safe_sort_field(requested: str | None) -> str:
return "created_at"
def asset_exists(asset_hash: str) -> bool:
def asset_exists(*, asset_hash: str) -> bool:
"""
Check if an asset with a given hash exists in database.
"""
with create_session() as session:
return asset_exists_by_hash(session, asset_hash=asset_hash)