forked from ToolJet/ToolJet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathauditLogsService.js
More file actions
29 lines (23 loc) · 1.09 KB
/
auditLogsService.js
File metadata and controls
29 lines (23 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import config from 'config';
import { authHeader, handleResponse } from '@/_helpers';
export const auditLogsService = { index, getLicenseTerms, getMaxDurationForAuditLogs, getResources };
function index(params) {
const requestOptions = {
method: 'GET',
headers: authHeader(),
credentials: 'include',
};
return fetch(`${config.apiUrl}/audit-logs?` + new URLSearchParams(params), requestOptions).then(handleResponse);
}
function getLicenseTerms() {
const requestOptions = { method: 'GET', headers: authHeader(), credentials: 'include' };
return fetch(`${config.apiUrl}/license/audit-logs/license-terms`, requestOptions).then(handleResponse);
}
function getMaxDurationForAuditLogs() {
const requestOptions = { method: 'GET', headers: authHeader(), credentials: 'include' };
return fetch(`${config.apiUrl}/license/audit-logs/max-duration`, requestOptions).then(handleResponse);
}
function getResources() {
const requestOptions = { method: 'GET', headers: authHeader(), credentials: 'include' };
return fetch(`${config.apiUrl}/audit-logs/resources`, requestOptions).then(handleResponse);
}