From 9110dd54a15f3d0fcf6f60936e01d816b667b93c Mon Sep 17 00:00:00 2001
From: JoramWilander <jwawilander@gmail.com>
Date: Mon, 4 Jan 2016 12:44:22 -0500
Subject: Added license validation and settings

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

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

diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx
index 96d1ef720..d60fea872 100644
--- a/web/react/utils/client.jsx
+++ b/web/react/utils/client.jsx
@@ -1392,3 +1392,38 @@ export function regenOutgoingHookToken(data, success, error) {
         }
     });
 }
+
+export function uploadLicenseFile(formData, success, error) {
+    $.ajax({
+        url: '/api/v1/license/add',
+        type: 'POST',
+        data: formData,
+        cache: false,
+        contentType: false,
+        processData: false,
+        success,
+        error: function onError(xhr, status, err) {
+            var e = handleError('uploadLicenseFile', xhr, status, err);
+            error(e);
+        }
+    });
+
+    track('api', 'api_license_upload');
+}
+
+export function removeLicenseFile(success, error) {
+    $.ajax({
+        url: '/api/v1/license/remove',
+        type: 'POST',
+        cache: false,
+        contentType: false,
+        processData: false,
+        success,
+        error: function onError(xhr, status, err) {
+            var e = handleError('removeLicenseFile', xhr, status, err);
+            error(e);
+        }
+    });
+
+    track('api', 'api_license_upload');
+}
-- 
cgit v1.2.3-1-g7c22

