aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/csam.py
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-09-19 17:58:05 +0200
committerChristophe Besson <cbesson@gmail.com>2026-09-19 17:58:05 +0200
commit1ec316035ce9aa656dd18a05889856bce9e3aba3 (patch)
treeb50e97f50d485ef2a88ce36fe4d7511d9fe3e288 /packages/meshbay-hub/src/meshbay_hub/csam.py
parent171a3e175889ce30f201fcdf5c4632f480344ae6 (diff)
parent95dd3dc13aecec85c2fd72410cd4d1f4ed582dfa (diff)
downloadmeshbay-1ec316035ce9aa656dd18a05889856bce9e3aba3.tar.gz
Merge origin/main: the tree-wide ruff pass beside the Music reconnect work
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/csam.py')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/csam.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/csam.py b/packages/meshbay-hub/src/meshbay_hub/csam.py
index 2a0ce25..b8e8d04 100644
--- a/packages/meshbay-hub/src/meshbay_hub/csam.py
+++ b/packages/meshbay-hub/src/meshbay_hub/csam.py
@@ -19,11 +19,14 @@ IMPORTANT: Never log matched hashes or file contents. CSAM detection
must be reported to NCMEC (US law) or relevant authority immediately.
"""
-import hashlib
import logging
-import os
from pathlib import Path
+from fastapi import APIRouter, Depends, HTTPException
+
+from meshbay_hub.api.deps import require_admin
+from meshbay_hub.db.models import User
+
log = logging.getLogger(__name__)
# Default path for the CSAM hash database (blake3 hex hashes, one per line)
@@ -123,10 +126,6 @@ def check_content_hash(blake3_hex: str) -> bool:
# ── Hub API integration ───────────────────────────────────────────────────────
-from fastapi import APIRouter, Depends, HTTPException, UploadFile, File
-from meshbay_hub.api.deps import require_admin
-from meshbay_hub.db.models import User
-
csam_router = APIRouter(prefix="/v1/admin/csam", tags=["csam"])