fix(api,userbot): clean app.py ending for every option set, handlers typed for current ty
This commit is contained in:
1 parent
db8184cb37
commit
6028507874
3 files changed
+16
-14
No files matched your search
+8
-4
@@ -40,7 +40,8 @@ app.add_middleware(
|
||||
)
|
||||
|
||||
app.include_router(routers.router)
|
||||
{% if serve_spa %}
|
||||
{%- if serve_spa %}
|
||||
|
||||
spa_dir = Path(env.api.static_dir).resolve()
|
||||
if spa_dir.is_dir():
|
||||
|
||||
@@ -52,6 +53,9 @@ if spa_dir.is_dir():
|
||||
headers = IMMUTABLE_HEADERS if immutable else NO_CACHE_HEADERS
|
||||
return FileResponse(candidate, headers=headers)
|
||||
return FileResponse(spa_dir / "index.html", headers=NO_CACHE_HEADERS)
|
||||
{% endif %}
|
||||
{% if use_dishka %}setup_dishka(container, app)
|
||||
{% endif %}
|
||||
{%- endif %}
|
||||
{%- if use_dishka %}
|
||||
|
||||
{% if serve_spa %}
|
||||
{% endif %}setup_dishka(container, app)
|
||||
{%- endif %}
|
||||
Reference in new issue
Block a user