添加chapter和lesson

This commit is contained in:
CakeCN
2025-08-29 21:41:20 +08:00
parent 5c0187bc4b
commit f9d8b3d092
19 changed files with 736 additions and 53 deletions

View File

@@ -33,7 +33,7 @@ def login_user(username: str, password: str, *, require_teacher: bool=False):
# 设置会话 + 关联映射
user_uuid = "user_" + str(uuid.uuid4())
session["user_id"] = user_uuid
session["user_uuid"] = user_uuid
username2uuid = current_app.extensions["username2uuid"]
uuid2username = current_app.extensions["uuid2username"]
@@ -43,4 +43,4 @@ def login_user(username: str, password: str, *, require_teacher: bool=False):
return True, "登录成功"
def logout_user():
session.pop("user_id", None)
session.pop("user_uuid", None)