File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 1313import boto3
1414from datetime import datetime
1515from functools import wraps
16+ from decimal import Decimal
1617
1718import boto3 .data
1819from defi .pools .protocol import ProtocolRegistry
@@ -236,16 +237,18 @@ def submit_feedback():
236237 if not whitelist .is_allowed (feedback_request .walletAddress ):
237238 return jsonify ({"error" : "Address is not whitelisted" }), 400
238239
239- timestamp = datetime .now (). isoformat ()
240+ timestamp = datetime .now ()
240241 user_timestamp = f"{ feedback_request .walletAddress } _{ timestamp } "
241242
243+ # Convert conversation history to string
244+ conversation_history_str = json .dumps (feedback_request .conversationHistory )
245+
242246 feedback_item = {
243- "user_timestamp " : user_timestamp ,
247+ "id " : user_timestamp ,
244248 "wallet_address" : feedback_request .walletAddress ,
245249 "feedback" : feedback_request .feedback ,
246250 "share_history" : feedback_request .shareHistory ,
247- "conversation_history" : feedback_request .conversationHistory ,
248- "timestamp" : timestamp ,
251+ "conversation_history" : conversation_history_str ,
249252 }
250253
251254 feedback_table .put_item (Item = feedback_item )
You can’t perform that action at this time.
0 commit comments