Merge branch 'main' of ssh://gitea.spdis.top/Viajero/Achievement_Inputing
This commit is contained in:
		
							
								
								
									
										10
									
								
								app.py
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								app.py
									
									
									
									
									
								
							@@ -474,7 +474,10 @@ def upload_image():
 | 
			
		||||
 | 
			
		||||
# 确认录入路由
 | 
			
		||||
@app.route('/confirm', methods=['POST'])
 | 
			
		||||
<<<<<<< HEAD
 | 
			
		||||
@user_or_admin_required
 | 
			
		||||
=======
 | 
			
		||||
>>>>>>> 30645e46ff2a6ee5c12fd95fb21b7eb4fb51c5f0
 | 
			
		||||
def confirm_data():
 | 
			
		||||
    """
 | 
			
		||||
    确认并录入用户编辑后的数据
 | 
			
		||||
@@ -499,11 +502,18 @@ def confirm_data():
 | 
			
		||||
        data_string = json_to_string(edited_data)
 | 
			
		||||
        print(f"转换后的数据字符串: {data_string}")
 | 
			
		||||
        
 | 
			
		||||
<<<<<<< HEAD
 | 
			
		||||
        # 构造新的数据结构,只包含data和image字段,并添加用户ID
 | 
			
		||||
        processed_data = {
 | 
			
		||||
            "data": data_string,
 | 
			
		||||
            "image": image_filename,  # 存储图片文件名
 | 
			
		||||
            "user_id": session['user_id']  # 添加用户ID关联
 | 
			
		||||
=======
 | 
			
		||||
        # 构造新的数据结构,只包含data和image字段
 | 
			
		||||
        processed_data = {
 | 
			
		||||
            "data": data_string,
 | 
			
		||||
            "image": image_filename  # 存储图片文件名
 | 
			
		||||
>>>>>>> 30645e46ff2a6ee5c12fd95fb21b7eb4fb51c5f0
 | 
			
		||||
        }
 | 
			
		||||
        print(f"准备存储的数据: {processed_data}")
 | 
			
		||||
        
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user