From 72591cc6d59d774e66d1d42af44bdc00f71f99f8 Mon Sep 17 00:00:00 2001
From: Eugen Rochko <eugen@zeonfederated.com>
Date: Wed, 31 Aug 2016 16:15:12 +0200
Subject: Cleaning up action names and compose drawer

---
 app/assets/javascripts/components/api.jsx | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 app/assets/javascripts/components/api.jsx

(limited to 'app/assets/javascripts/components/api.jsx')

diff --git a/app/assets/javascripts/components/api.jsx b/app/assets/javascripts/components/api.jsx
new file mode 100644
index 000000000..f317af094
--- /dev/null
+++ b/app/assets/javascripts/components/api.jsx
@@ -0,0 +1,11 @@
+import axios from 'axios';
+
+export default getState => axios.create({
+  headers: {
+    'Authorization': `Bearer ${getState().getIn(['meta', 'access_token'], '')}`
+  },
+
+  transformResponse: [function (data) {
+    return JSON.parse(data);
+  }]
+});
-- 
cgit 

