feat(auth): 增加登录验证和五天会话

This commit is contained in:
admin committed 2026-09-21 17:46:43 +08:00
1 parent ecd16bcefc
commit 810b52a051
14 files changed
+467 -20

No files matched your search

+4 -5
View File
@@ -73,14 +73,13 @@ import pymysql
from reading_api import MYSQL_CONFIG
migration = Path("migrations/001_reading_goals.sql")
if migration.exists():
with pymysql.connect(**MYSQL_CONFIG) as conn:
with conn.cursor() as cur:
with pymysql.connect(**MYSQL_CONFIG) as conn:
with conn.cursor() as cur:
for migration in sorted(Path("migrations").glob("*.sql")):
for sql in migration.read_text(encoding="utf-8").split(";"):
if sql.strip():
cur.execute(sql)
conn.commit()
conn.commit()
PY
echo "[5/5] 重启服务 $SERVICE_NAME"