From 93de7c13026966e58bd9eb9ab4c472595edcd834 Mon Sep 17 00:00:00 2001 From: Hermes Bot Date: Wed, 24 Jun 2026 21:59:59 -0400 Subject: [PATCH] chore(dashboard): remove dead STL-serving route MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The /stl/{filename} route (serve_stl) and its mimetypes/.stl + FileResponse plumbing were added in #52 but no dashboard frontend references /stl/ or .stl — STL artifacts are delivered via Hermes Deliverable Mode + Discord, not the dashboard. Removing the unused route, its only-use imports (mimetypes, FileResponse), and the leftover untracked sample STLs under static/stl/ so the code matches the actual delivery path. Co-Authored-By: Claude Opus 4.8 (1M context) --- dashboard/app.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/dashboard/app.py b/dashboard/app.py index 2340853..de63ae1 100644 --- a/dashboard/app.py +++ b/dashboard/app.py @@ -6,7 +6,6 @@ import ipaddress import json import logging -import mimetypes import os import re import subprocess @@ -2121,20 +2120,6 @@ def _empty_payload(): _routes_registry.register(app, _ops_request) _routes_model_config.register(app, _ops_request) -mimetypes.add_type("application/octet-stream", ".stl") - -# --- STL File Serving --- -from fastapi.responses import FileResponse - -STL_DIR = Path(__file__).parent / "static" / "stl" -if STL_DIR.exists(): - @app.get("/stl/{filename}") - async def serve_stl(filename: str): - stl_path = STL_DIR / filename - if stl_path.exists(): - return FileResponse(str(stl_path), media_type="application/octet-stream") - raise HTTPException(status_code=404, detail="File not found") - # --- Static --- static_dir = Path(__file__).parent / "static"