client/src/api/APIClient.js
changeset 134 be36eed5e6e0
parent 129 d48946d164c6
--- a/client/src/api/APIClient.js	Thu Aug 03 09:44:37 2017 +0200
+++ b/client/src/api/APIClient.js	Thu Aug 03 17:33:00 2017 +0200
@@ -1,4 +1,5 @@
 import qs from 'qs';
+import { getToken, getClientId } from '../selectors/authSelectors'
 
 class APIClient {
   constructor(baseURL) {
@@ -40,12 +41,12 @@
 
   getToken = () => {
     const state = this.store.getState();
-    return state.getIn(['authStatus', 'token']);
+    return getToken(state);
   }
 
   getClientId = () => {
     const state = this.store.getState();
-    return state.getIn(['authStatus', 'clientId']);
+    return getClientId(state);
   }
 
   hasToken = () => {