From 44714dfcb18b9a393dc34be3c182b0c092eec28a Mon Sep 17 00:00:00 2001
From: =Corey Hulen <corey@hulen.com>
Date: Thu, 17 Sep 2015 21:00:59 -0700
Subject: PLT-11 Adding ability to save config file

---
 web/react/utils/async_client.jsx | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

(limited to 'web/react/utils/async_client.jsx')

diff --git a/web/react/utils/async_client.jsx b/web/react/utils/async_client.jsx
index 3e23e5c33..ed228f6c4 100644
--- a/web/react/utils/async_client.jsx
+++ b/web/react/utils/async_client.jsx
@@ -345,6 +345,32 @@ export function getLogs() {
     );
 }
 
+export function getConfig() {
+    if (isCallInProgress('getConfig')) {
+        return;
+    }
+
+    callTracker.getConfig = utils.getTimestamp();
+    client.getConfig(
+        (data, textStatus, xhr) => {
+            callTracker.getConfig = 0;
+
+            if (xhr.status === 304 || !data) {
+                return;
+            }
+
+            AppDispatcher.handleServerAction({
+                type: ActionTypes.RECIEVED_CONFIG,
+                config: data
+            });
+        },
+        (err) => {
+            callTracker.getConfig = 0;
+            dispatchError(err, 'getConfig');
+        }
+    );
+}
+
 export function findTeams(email) {
     if (isCallInProgress('findTeams_' + email)) {
         return;
-- 
cgit v1.2.3-1-g7c22

