Skip to content

Commit 57df0ca

Browse files
Adam BaloghAdam Balogh
authored andcommitted
fix feedback
1 parent bc4cabd commit 57df0ca

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

server/server.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import boto3
1414
from datetime import datetime
1515
from functools import wraps
16+
from decimal import Decimal
1617

1718
import boto3.data
1819
from 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)

0 commit comments

Comments
 (0)