fix: adapt TemplateResponse calls to Starlette 1.0 new-style API

Starlette 1.0.0 changed TemplateResponse signature from
(name, context_dict) to (request, name, context=dict).

- Update base.py wrapper to convert old-style calls to new-style
- Update main.py error handler TemplateResponse calls
- Update local_auth.py, billing.py, auth.py, share.py calls
- Update test mocks for new calling convention

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
Agent-Logs-Url: https://github.com/christianlouis/DocuElevate/sessions/7b5f7e0d-89ad-43be-b68d-a9c0c5407a7e
This commit is contained in:
copilot-swe-agent[bot]
2026-03-23 12:50:09 +00:00
parent b4e0067a27
commit c4e10bee5e
8 changed files with 52 additions and 27 deletions
+2 -2
View File
@@ -536,9 +536,9 @@ async def login(request: Request):
return RedirectResponse(url="/oauth-login", status_code=status.HTTP_302_FOUND)
return templates.TemplateResponse(
request,
"login.html",
{
"request": request,
context={
"error": error,
"message": message,
"show_oauth": show_oauth,