新增 消息定时推送功能
This commit is contained in:
@@ -54,9 +54,14 @@ def api_create_task():
|
||||
if not data:
|
||||
return jsonify({"success": False, "error": "无效的请求数据"}), 400
|
||||
|
||||
# 获取用户名
|
||||
username = session.get('username')
|
||||
if not username:
|
||||
return jsonify({"success": False, "error": "未登录或会话已过期"}), 401
|
||||
|
||||
# 生成任务ID
|
||||
data['task_id'] = str(uuid.uuid4())
|
||||
data['creator_id'] = session.get('user_id') # 从session中获取用户ID
|
||||
data['creator_id'] = username
|
||||
|
||||
# 创建任务
|
||||
db = current_app.dashboard_server.task_db
|
||||
|
||||
Reference in New Issue
Block a user