chore: unify education management naming
This commit is contained in:
+1
-1
@@ -56,7 +56,7 @@ def is_records_authenticated(
|
||||
request,
|
||||
RECORDS_SESSION_COOKIE,
|
||||
BASIC_AUTH_PASSWORD,
|
||||
b"xsk-records-web-session-v1",
|
||||
b"xsk-education-management-records-session-v1",
|
||||
) or has_valid_basic_auth(credentials, BASIC_AUTH_PASSWORD)
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ ACCOUNTS_AUTH_PASSWORD = os.getenv("ACCOUNTS_AUTH_PASSWORD") or os.getenv("ACCOU
|
||||
ADMIN_AUTH_PASSWORD = os.getenv("ADMIN_AUTH_PASSWORD") or ACCOUNTS_AUTH_PASSWORD
|
||||
INGEST_AUTH_TOKEN = os.getenv("INGEST_AUTH_TOKEN", "")
|
||||
|
||||
RECORDS_SESSION_COOKIE = "xsk_records_session"
|
||||
RECORDS_SESSION_COOKIE = "xsk_education_management_records_session"
|
||||
ACCOUNTS_SESSION_COOKIE = "xsk_accounts_session"
|
||||
ADMIN_SESSION_COOKIE = "xsk_admin_session"
|
||||
SESSION_MAX_AGE = 60 * 60 * 24 * 30
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ from fastapi.responses import JSONResponse
|
||||
from .routers import accounts, admin, health, ingest, pages, records
|
||||
|
||||
|
||||
app = FastAPI(title="新时空教务管家", version="1.0.0")
|
||||
app = FastAPI(title="新时空教务管理系统", version="1.0.0")
|
||||
|
||||
|
||||
@app.exception_handler(ValueError)
|
||||
|
||||
@@ -241,7 +241,7 @@ def login_page(
|
||||
return RedirectResponse(url=next_path, status_code=status.HTTP_303_SEE_OTHER)
|
||||
return HTMLResponse(
|
||||
render_login_page(
|
||||
title="新时空教务管家",
|
||||
title="新时空教务管理系统",
|
||||
action="/login",
|
||||
next_path=next_path,
|
||||
has_error=has_error,
|
||||
@@ -260,7 +260,7 @@ async def login_submit(request: Request):
|
||||
response = RedirectResponse(url=next_path, status_code=status.HTTP_303_SEE_OTHER)
|
||||
response.set_cookie(
|
||||
RECORDS_SESSION_COOKIE,
|
||||
session_token(records_password, b"xsk-records-web-session-v1"),
|
||||
session_token(records_password, b"xsk-education-management-records-session-v1"),
|
||||
max_age=SESSION_MAX_AGE,
|
||||
httponly=True,
|
||||
samesite="lax",
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>新时空教务管家</title>
|
||||
<title>新时空教务管理系统</title>
|
||||
<link rel="stylesheet" href="/static/styles.css?v=20260613-date-time-sort" />
|
||||
</head>
|
||||
<body>
|
||||
<header class="topbar">
|
||||
<div>
|
||||
<h1>新时空教务管家</h1>
|
||||
<h1>新时空教务管理系统</h1>
|
||||
<p id="healthText">正在读取数据状态</p>
|
||||
</div>
|
||||
<div class="top-actions">
|
||||
|
||||
Reference in New Issue
Block a user