summaryrefslogtreecommitdiffstats
path: root/web/react/utils/client.jsx
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2016-01-04 12:44:22 -0500
committerJoramWilander <jwawilander@gmail.com>2016-01-14 08:24:09 -0500
commit9110dd54a15f3d0fcf6f60936e01d816b667b93c (patch)
treebe6ddca1c4dc47b71de4c7ad8af59cb21a594b56 /web/react/utils/client.jsx
parent53b0cd8f2a24798c67505aa447b1d53b9f14197e (diff)
downloadchat-9110dd54a15f3d0fcf6f60936e01d816b667b93c.tar.gz
chat-9110dd54a15f3d0fcf6f60936e01d816b667b93c.tar.bz2
chat-9110dd54a15f3d0fcf6f60936e01d816b667b93c.zip
Added license validation and settings
Diffstat (limited to 'web/react/utils/client.jsx')
-rw-r--r--web/react/utils/client.jsx35
1 files changed, 35 insertions, 0 deletions
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');
+}