expanded log activity
This commit is contained in:
@ -92,3 +92,11 @@ export function apiDownloadUrl(endpoint) {
|
||||
const cleanEndpoint = endpoint.replace(/\.php(\?|$)/, '$1');
|
||||
return `${API_BASE}/${cleanEndpoint}${cleanEndpoint.includes('?') ? '&' : '?'}token=${encodeURIComponent(token)}`;
|
||||
}
|
||||
|
||||
/** Authenticated file/download fetch (marks request as website for activity logging). */
|
||||
export async function apiDownloadFetch(url, options = {}) {
|
||||
const token = getToken();
|
||||
const headers = { ...(options.headers || {}), 'X-QDB-Client': 'web' };
|
||||
if (token) headers['Authorization'] = `Bearer ${token}`;
|
||||
return fetch(url, { ...options, headers });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user