mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
fix(FastAPI): reorganize credential checkin into dedicated file
Signed-off-by: Steven Guikal <void@fluix.one>
This commit is contained in:
parent
125b244f44
commit
a10f8663fd
15 changed files with 143 additions and 172 deletions
|
@ -16,7 +16,7 @@ from fastapi.responses import HTMLResponse
|
|||
|
||||
import aurweb.config
|
||||
|
||||
from aurweb import captcha, cookies, l10n, time, util
|
||||
from aurweb import auth, captcha, cookies, l10n, time, util
|
||||
|
||||
# Prepare jinja2 objects.
|
||||
_loader = jinja2.FileSystemLoader(os.path.join(
|
||||
|
@ -107,6 +107,7 @@ def make_context(request: Request, title: str, next: str = None):
|
|||
"now": datetime.now(tz=zoneinfo.ZoneInfo(timezone)),
|
||||
"utcnow": int(datetime.utcnow().timestamp()),
|
||||
"config": aurweb.config,
|
||||
"creds": auth.creds,
|
||||
"next": next if next else request.url.path
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue