diff options
author | Dan Finlay <dan@danfinlay.com> | 2018-06-05 05:30:24 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2018-06-05 05:30:24 +0800 |
commit | d07c664b2c31469d84dd3c84a929b8d4ba552e8c (patch) | |
tree | a9a34cbcf11245feb60a37fa8cd18c1f718c063c /app/scripts/lib | |
parent | b858cc4b1bf13c7c813fe48bb0b12f9eb3cc4a0d (diff) | |
download | tangerine-wallet-browser-d07c664b2c31469d84dd3c84a929b8d4ba552e8c.tar tangerine-wallet-browser-d07c664b2c31469d84dd3c84a929b8d4ba552e8c.tar.gz tangerine-wallet-browser-d07c664b2c31469d84dd3c84a929b8d4ba552e8c.tar.bz2 tangerine-wallet-browser-d07c664b2c31469d84dd3c84a929b8d4ba552e8c.tar.lz tangerine-wallet-browser-d07c664b2c31469d84dd3c84a929b8d4ba552e8c.tar.xz tangerine-wallet-browser-d07c664b2c31469d84dd3c84a929b8d4ba552e8c.tar.zst tangerine-wallet-browser-d07c664b2c31469d84dd3c84a929b8d4ba552e8c.zip |
Fine tune error posting
Diffstat (limited to 'app/scripts/lib')
-rw-r--r-- | app/scripts/lib/bug-notifier.js | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/app/scripts/lib/bug-notifier.js b/app/scripts/lib/bug-notifier.js index d6a2ed2c9..42f943485 100644 --- a/app/scripts/lib/bug-notifier.js +++ b/app/scripts/lib/bug-notifier.js @@ -1,14 +1,11 @@ class BugNotifier { notify (uri, message) { return postData(uri, message) - .then(data => console.log(data)) // JSON from `response.json()` call - .catch(error => console.error(error)) } } function postData(uri, data) { - - return fetch(url, { + return fetch(uri, { body: JSON.stringify(data), // must match 'Content-Type' header credentials: 'same-origin', // include, same-origin, *omit headers: { @@ -17,7 +14,6 @@ function postData(uri, data) { method: 'POST', // *GET, POST, PUT, DELETE, etc. mode: 'cors', // no-cors, cors, *same-origin }) - .then(response => response.json()) // parses response to JSON } module.exports = BugNotifier |