From 7d95a6187a23f7ce9fc461f9ef0d5cba899b5ce1 Mon Sep 17 00:00:00 2001 From: Shroominic Date: Mon, 27 Oct 2025 14:09:48 +0800 Subject: [PATCH] ruff fmt --- routstr/core/main.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/routstr/core/main.py b/routstr/core/main.py index dfb05dc9..aa0dc20e 100644 --- a/routstr/core/main.py +++ b/routstr/core/main.py @@ -198,7 +198,7 @@ if UI_DIST_PATH.exists() and UI_DIST_PATH.is_dir(): @app.get("/", include_in_schema=False) async def serve_root_ui() -> FileResponse: return FileResponse(UI_DIST_PATH / "index.html") - + # Add explicit route for /index.txt to redirect to / @app.get("/index.txt", include_in_schema=False) async def redirect_index_txt() -> RedirectResponse: @@ -215,7 +215,7 @@ if UI_DIST_PATH.exists() and UI_DIST_PATH.is_dir(): @app.get("/login", include_in_schema=False) async def serve_login_ui() -> FileResponse: return FileResponse(UI_DIST_PATH / "login" / "index.html") - + # Add explicit route for /login/index.txt to redirect to /login @app.get("/login/index.txt", include_in_schema=False) async def redirect_login_index_txt() -> RedirectResponse: @@ -224,7 +224,7 @@ if UI_DIST_PATH.exists() and UI_DIST_PATH.is_dir(): @app.get("/model", include_in_schema=False) async def serve_models_ui() -> FileResponse: return FileResponse(UI_DIST_PATH / "model" / "index.html") - + # Add explicit route for /model/index.txt to redirect to /model @app.get("/model/index.txt", include_in_schema=False) async def redirect_model_index_txt() -> RedirectResponse: @@ -233,7 +233,7 @@ if UI_DIST_PATH.exists() and UI_DIST_PATH.is_dir(): @app.get("/providers", include_in_schema=False) async def serve_providers_ui() -> FileResponse: return FileResponse(UI_DIST_PATH / "providers" / "index.html") - + # Add explicit route for /providers/index.txt to redirect to /providers @app.get("/providers/index.txt", include_in_schema=False) async def redirect_providers_index_txt() -> RedirectResponse: @@ -242,7 +242,7 @@ if UI_DIST_PATH.exists() and UI_DIST_PATH.is_dir(): @app.get("/settings", include_in_schema=False) async def serve_settings_ui() -> FileResponse: return FileResponse(UI_DIST_PATH / "settings" / "index.html") - + # Add explicit route for /settings/index.txt to redirect to /settings @app.get("/settings/index.txt", include_in_schema=False) async def redirect_settings_index_txt() -> RedirectResponse: @@ -251,7 +251,7 @@ if UI_DIST_PATH.exists() and UI_DIST_PATH.is_dir(): @app.get("/transactions", include_in_schema=False) async def serve_transactions_ui() -> FileResponse: return FileResponse(UI_DIST_PATH / "transactions" / "index.html") - + # Add explicit route for /transactions/index.txt to redirect to /transactions @app.get("/transactions/index.txt", include_in_schema=False) async def redirect_transactions_index_txt() -> RedirectResponse: @@ -260,7 +260,7 @@ if UI_DIST_PATH.exists() and UI_DIST_PATH.is_dir(): @app.get("/unauthorized", include_in_schema=False) async def serve_unauthorized_ui() -> FileResponse: return FileResponse(UI_DIST_PATH / "unauthorized" / "index.html") - + # Add explicit route for /unauthorized/index.txt to redirect to /unauthorized @app.get("/unauthorized/index.txt", include_in_schema=False) async def redirect_unauthorized_index_txt() -> RedirectResponse: