From 3f5993eedfd52a0497f7a537601b2d7c9e4d744d Mon Sep 17 00:00:00 2001
From: hmhealey <harrisonmhealey@gmail.com>
Date: Tue, 11 Aug 2015 14:36:45 -0400
Subject: Added initial api to allow clientside code to query serverside
 configuration

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

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

diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx
index 6a1f7c820..5b5d8dc32 100644
--- a/web/react/utils/client.jsx
+++ b/web/react/utils/client.jsx
@@ -849,3 +849,24 @@ module.exports.updateValetFeature = function(data, success, error) {
 
     module.exports.track('api', 'api_teams_update_valet_feature');
 };
+
+module.exports.isEmailEnabledSynchronous = function() {
+    var enabled = false;
+
+    $.ajax({
+        async: false,
+        url: '/api/v1/config/get/bypass_email',
+        dataType: 'json',
+        type: 'GET',
+        success: function(value) {
+            enabled = !value;
+        },
+        error: function(xhr, status, err) {
+            if (status != 200) {
+                handleError("isEmailEnabled", xhr, status, err);
+            }
+        }
+    });
+
+    return enabled;
+};
-- 
cgit v1.2.3-1-g7c22

