From 27840d8afa1ade712592cd167a96220e5fbf6b4e Mon Sep 17 00:00:00 2001 From: D <157692623+dh4340@users.noreply.github.com> Date: Fri, 8 Nov 2024 13:26:51 +0000 Subject: [PATCH] Remove css and js from html_routes Both CSS and JS methods here don't need to exist. They are in other routes, which means they can be used for multiple purposes. The main handles this at line 150 and 151 respectively. --- src/ghosts.pandora/app/routes/html_routes.py | 34 +++++--------------- 1 file changed, 8 insertions(+), 26 deletions(-) diff --git a/src/ghosts.pandora/app/routes/html_routes.py b/src/ghosts.pandora/app/routes/html_routes.py index aba2ed3a..13d62c7f 100644 --- a/src/ghosts.pandora/app/routes/html_routes.py +++ b/src/ghosts.pandora/app/routes/html_routes.py @@ -84,6 +84,7 @@ def return_chm(file_name: str = None) -> StreamingResponse: return response + @router.get("/", tags=["Information"]) @router.get("/html", tags=["Web"]) @router.post("/html", tags=["Web"]) @@ -106,9 +107,14 @@ def return_html(file_name: str = None) -> HTMLResponse: for _ in range(random.randint(1, 20)): if random.randint(2, 100) > 55: body = body + f"
{fake.paragraph(nb_sentences=random.randint(1, 100))}
" + body = ( + body + f"{fake.paragraph(nb_sentences=random.randint(1, 100))}
" + ) if random.randint(1, 100) > 85: - body = body + f"