mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 00:06:01 +00:00
SYNC: Merge branch 'feature/audit-logs'
This commit is contained in:
committed by
Diflow
parent
e3c6d05a0a
commit
90bbdd563b
@@ -185,6 +185,7 @@ export async function apiCall(
|
||||
cache: 'no-cache',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'x-api-session-id': getApiSessionId(),
|
||||
...resolveApiHeaders(),
|
||||
},
|
||||
body: JSON.stringify(args, serializeJsTypesReplacer),
|
||||
@@ -318,6 +319,20 @@ export function refreshPublicCloudFiles(force = false) {
|
||||
sessionStorage.setItem('publicCloudFilesLoaded', 'true');
|
||||
}
|
||||
|
||||
let apiSessionIdValue = null;
|
||||
function getApiSessionId() {
|
||||
if (!apiSessionIdValue) {
|
||||
apiSessionIdValue = uuidv1();
|
||||
}
|
||||
return apiSessionIdValue;
|
||||
|
||||
// if (!sessionStorage.getItem('apiSessionId')) {
|
||||
// const sessionId = uuidv1();
|
||||
// sessionStorage.setItem('apiSessionId', sessionId);
|
||||
// }
|
||||
// return sessionStorage.getItem('apiSessionId');
|
||||
}
|
||||
|
||||
function enableApiLog() {
|
||||
apiLogging = true;
|
||||
console.log('API loggin enabled');
|
||||
|
||||
Reference in New Issue
Block a user