aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/bug-notifier.js
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-06-05 09:02:30 +0800
committerDan <danjm.com@gmail.com>2018-06-05 09:02:30 +0800
commitaee9247faab984734d2f0278baaf768e2a7926d2 (patch)
tree1805e6f28975c0002e8cbb15ef9920a96b90ec19 /app/scripts/lib/bug-notifier.js
parent139f930185f134ef50d547ca07a580e11b5cf731 (diff)
parent3b6e96bac918925c4edc674e26dba8cc5feb1324 (diff)
downloadtangerine-wallet-browser-aee9247faab984734d2f0278baaf768e2a7926d2.tar
tangerine-wallet-browser-aee9247faab984734d2f0278baaf768e2a7926d2.tar.gz
tangerine-wallet-browser-aee9247faab984734d2f0278baaf768e2a7926d2.tar.bz2
tangerine-wallet-browser-aee9247faab984734d2f0278baaf768e2a7926d2.tar.lz
tangerine-wallet-browser-aee9247faab984734d2f0278baaf768e2a7926d2.tar.xz
tangerine-wallet-browser-aee9247faab984734d2f0278baaf768e2a7926d2.tar.zst
tangerine-wallet-browser-aee9247faab984734d2f0278baaf768e2a7926d2.zip
Merge branch 'develop' into i3725-refactor-send-component-
Diffstat (limited to 'app/scripts/lib/bug-notifier.js')
-rw-r--r--app/scripts/lib/bug-notifier.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/app/scripts/lib/bug-notifier.js b/app/scripts/lib/bug-notifier.js
new file mode 100644
index 000000000..4d305b894
--- /dev/null
+++ b/app/scripts/lib/bug-notifier.js
@@ -0,0 +1,22 @@
+class BugNotifier {
+ notify (uri, message) {
+ return postData(uri, message)
+ }
+}
+
+function postData(uri, data) {
+ return fetch(uri, {
+ body: JSON.stringify(data), // must match 'Content-Type' header
+ credentials: 'same-origin', // include, same-origin, *omit
+ headers: {
+ 'content-type': 'application/json',
+ },
+ method: 'POST', // *GET, POST, PUT, DELETE, etc.
+ mode: 'cors', // no-cors, cors, *same-origin
+ })
+}
+
+const notifier = new BugNotifier()
+
+module.exports = notifier
+