Skip to content

Commit 40c18be

Browse files
committed
Merge pull request #1735 from uProxy/lucyhe-feedbackfix
Submit feedbackType as a string, not a number.
2 parents a874f56 + 92a841b commit 40c18be

File tree

1 file changed

+4
-8
lines changed
  • src/generic_ui/scripts

1 file changed

+4
-8
lines changed

src/generic_ui/scripts/ui.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@ export class UserInterface implements ui_constants.UiApi {
871871
"d1wtwocg4wx1ih.cloudfront.net"
872872
]
873873

874-
public postToCloudfrontSite = (payload :any, cloudfrontPath :string,
874+
public postToCloudfrontSite = (payload :Object, cloudfrontPath :string,
875875
maxAttempts ?:number)
876876
: Promise<void> => {
877877
console.log('postToCloudfrontSite: ', payload, cloudfrontPath);
@@ -906,18 +906,14 @@ export class UserInterface implements ui_constants.UiApi {
906906
logsPromise = Promise.resolve('');
907907
}
908908
return logsPromise.then((logs) => {
909-
var payload :uproxy_core_api.UserFeedback = {
909+
var payload = {
910910
email: feedback.email,
911911
feedback: feedback.feedback,
912912
logs: logs,
913-
feedbackType: feedback.feedbackType
913+
feedbackType: uproxy_core_api.UserFeedbackType[feedback.feedbackType],
914+
proxyingId: this.proxyingId
914915
};
915916

916-
if (payload.feedbackType ===
917-
uproxy_core_api.UserFeedbackType.PROXYING_FAILURE) {
918-
payload.proxyingId = this.proxyingId;
919-
}
920-
921917
return this.postToCloudfrontSite(payload, 'submit-feedback');
922918
});
923919
}

0 commit comments

Comments
 (0)