summaryrefslogtreecommitdiffstats
path: root/web/react/utils/client.jsx
diff options
context:
space:
mode:
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');
+}