Skip to content

Commit

Permalink
0 := no feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
LarynQi committed Nov 18, 2023
1 parent f224cd3 commit 8248bba
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions client/protocols/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,18 @@ def _get_feedback(self, req_id):

print("\nThank you for your feedback.\n")

if req_id:
feedback_payload = {
'version': 'v2',
'key': self.FEEDBACK_KEY,
'requestId': req_id,
'feedback': feedback
}
feedback_response = requests.post(self.FEEDBACK_ENDPOINT, json=feedback_payload).json()
return feedback_response.get('status')
else:
feedback = 0

if req_id:
feedback_payload = {
'version': 'v2',
'key': self.FEEDBACK_KEY,
'requestId': req_id,
'feedback': feedback
}
feedback_response = requests.post(self.FEEDBACK_ENDPOINT, json=feedback_payload).json()
return feedback_response.get('status')

def _get_binary_feedback(self, req_id):
skip_str = ' Hit Enter to skip.' if not self.FEEDBACK_REQUIRED else ''
Expand Down

0 comments on commit 8248bba

Please sign in to comment.