summaryrefslogtreecommitdiffstats
path: root/web/react/utils/client.jsx
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2016-03-14 16:07:58 -0700
committer=Corey Hulen <corey@hulen.com>2016-03-15 18:27:45 -0700
commit36b17bf99ddd35c0c223722f8b6f4f1c71b2235e (patch)
tree6bc07d42d19d1d7a5bef26864bb93a1bc91da5f1 /web/react/utils/client.jsx
parentea3f25924ea64a2dd1e73624c0d30824e1efb240 (diff)
downloadchat-36b17bf99ddd35c0c223722f8b6f4f1c71b2235e.tar.gz
chat-36b17bf99ddd35c0c223722f8b6f4f1c71b2235e.tar.bz2
chat-36b17bf99ddd35c0c223722f8b6f4f1c71b2235e.zip
PLT-2115 Adding compliance
Diffstat (limited to 'web/react/utils/client.jsx')
-rw-r--r--web/react/utils/client.jsx29
1 files changed, 29 insertions, 0 deletions
diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx
index e00f28a14..5607a4b60 100644
--- a/web/react/utils/client.jsx
+++ b/web/react/utils/client.jsx
@@ -412,6 +412,35 @@ export function getAudits(userId, success, error) {
});
}
+export function getComplianceReports(success, error) {
+ $.ajax({
+ url: '/api/v1/admin/compliance_reports',
+ dataType: 'json',
+ contentType: 'application/json',
+ type: 'GET',
+ success,
+ error: function onError(xhr, status, err) {
+ var e = handleError('getComplianceReports', xhr, status, err);
+ error(e);
+ }
+ });
+}
+
+export function saveComplianceReports(job, success, error) {
+ $.ajax({
+ url: '/api/v1/admin/save_compliance_report',
+ dataType: 'json',
+ contentType: 'application/json',
+ type: 'POST',
+ data: JSON.stringify(job),
+ success,
+ error: (xhr, status, err) => {
+ var e = handleError('saveComplianceReports', xhr, status, err);
+ error(e);
+ }
+ });
+}
+
export function getLogs(success, error) {
$.ajax({
url: '/api/v1/admin/logs',