Skip to content

Commit

Permalink
Merge pull request #2157 from veteransaffairscanada/develop
Browse files Browse the repository at this point in the history
Develop to master
  • Loading branch information
Sarah Thompson authored May 15, 2019
2 parents 11db9fd + 21c81ef commit fd7cbfa
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
18 changes: 10 additions & 8 deletions components/feedbackBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,16 @@ export class FeedbackBar extends Component {
time: new Date().toUTCString()
};

fetch("/submitComment", {
body: JSON.stringify(payload),
cache: "no-cache",
headers: {
"content-type": "application/json"
},
method: "POST"
}).catch(err => Raven.captureException(err));
if (payload.whatWentWrong || payload.howCanInfoBeMoreUseful) {
fetch("/submitComment", {
body: JSON.stringify(payload),
cache: "no-cache",
headers: {
"content-type": "application/json"
},
method: "POST"
}).catch(err => Raven.captureException(err));
}
};

sendFeedback = answer => {
Expand Down
18 changes: 10 additions & 8 deletions pages/feedback.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,16 @@ export class Feedback extends Component {
time: new Date().toUTCString()
};

fetch("/submitBetaFeedback", {
body: JSON.stringify(payload),
cache: "no-cache",
headers: {
"content-type": "application/json"
},
method: "POST"
}).catch(err => Raven.captureException(err));
if (payload.how_was_your_experience || payload.what_did_you_think) {
fetch("/submitBetaFeedback", {
body: JSON.stringify(payload),
cache: "no-cache",
headers: {
"content-type": "application/json"
},
method: "POST"
}).catch(err => Raven.captureException(err));
}
};

render() {
Expand Down

0 comments on commit fd7cbfa

Please sign in to comment.