Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions api/app_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,4 @@ async def handle_oauth_error(request: Request, exc: Exception):
# For other errors, let them bubble up
raise exc

# Add template globals
@app.middleware("http")
async def add_template_globals(request: Request, call_next):
request.state.google_tag_manager_id = os.getenv("GOOGLE_TAG_MANAGER_ID")
response = await call_next(request)
return response

return app
1 change: 1 addition & 0 deletions api/routes/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
)
)

templates.env.globals["google_tag_manager_id"] = os.getenv("GOOGLE_TAG_MANAGER_ID")

# ---- Helpers ----
def _get_provider_client(request: Request, provider: str):
Expand Down
Loading