diff options
Diffstat (limited to 'web/react/utils/client.jsx')
-rw-r--r-- | web/react/utils/client.jsx | 29 |
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', |