mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-08-10 07:28:41 -04:00
refactor(routes): move admin_wipe domain into routes/admin_wipe/ subpackage (#5659)
Slice 2h of the route-domain reorganization (#4082/#4071). Moves admin_wipe_routes.py into routes/admin_wipe/, leaving a backward-compat sys.modules shim at the old path. Pure file reorganization, no behavior change. The shim uses sys.modules replacement so the `import ... as admin_wipe_routes` + `monkeypatch.setattr(admin_wipe_routes, "SessionLocal", ...)` / `"require_admin"` pattern in test_admin_wipe_gallery.py reaches the canonical module. Canonical module imports only from core/, src/, and stdlib (zero internal routes/ coupling). Zero source-introspection landmines. Adds tests/test_admin_wipe_routes_shim.py to pin the sys.modules shim contract. Verified: compileall clean; targeted tests pass.
This commit is contained in:
@@ -663,7 +663,7 @@ app.include_router(setup_session_routes(
|
||||
))
|
||||
|
||||
# Admin Danger Zone wipes (Settings → System → Danger Zone)
|
||||
from routes.admin_wipe_routes import setup_admin_wipe_routes
|
||||
from routes.admin_wipe.admin_wipe_routes import setup_admin_wipe_routes
|
||||
app.include_router(setup_admin_wipe_routes(session_manager))
|
||||
|
||||
# Memory
|
||||
|
||||
Reference in New Issue
Block a user