You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
332 B
Python
11 lines
332 B
Python
from fastapi import Request
|
|
|
|
from admin_app.core.settings import AdminSettings, get_admin_settings
|
|
|
|
|
|
def get_settings(request: Request) -> AdminSettings:
|
|
app_settings = getattr(request.app.state, "admin_settings", None)
|
|
if isinstance(app_settings, AdminSettings):
|
|
return app_settings
|
|
return get_admin_settings()
|