Skip to content

Commit 0c2af4a

Browse files
committed
rm statics
1 parent db70793 commit 0c2af4a

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

examples/demo_fastapi.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -176,16 +176,6 @@ class Review(BaseModel):
176176
http_methods = {"GET", "POST"}
177177

178178

179-
def _mount_optional_static(app: FastAPI) -> None:
180-
repo_root = Path(__file__).resolve().parent.parent
181-
ja_dir = repo_root / "jsonapi-admin" / "build"
182-
swagger_editor_dir = repo_root / "swagger-editor"
183-
if ja_dir.exists():
184-
app.mount("/ja", StaticFiles(directory=str(ja_dir), html=True), name="jsonapi_admin")
185-
if swagger_editor_dir.exists():
186-
app.mount("/swagger_editor", StaticFiles(directory=str(swagger_editor_dir), html=True), name="swagger_editor")
187-
188-
189179
def _seed_data(session: Any, nr_instances: int = 100) -> None:
190180
if session.query(Person).count() > 0:
191181
return
@@ -244,8 +234,6 @@ async def safrs_session_middleware(request: Any, call_next: Any) -> Any:
244234
for model in [Person, Book, Review, Publisher]:
245235
api.expose_object(model)
246236

247-
_mount_optional_static(app)
248-
249237
@app.get("/", include_in_schema=False)
250238
def root() -> Any:
251239
return RedirectResponse(url="/docs/")

0 commit comments

Comments
 (0)