✨ Add audit log CSV download

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-03 19:12:27 +02:00
co-authored by Claude Opus 5.5
parent 02e5b1f4e4
commit 2bbda8d24e
4 changed files with 47 additions and 12 deletions
+7 -1
View File
@@ -23,6 +23,12 @@ export function useS3Client() {
return $fetch<Blob>(`/api${encodeCanonicalPath(path)}`, { headers, responseType: 'blob' })
}
async function downloadAuditLogs(): Promise<Blob> {
const path = '/_audit-logs/csv'
const headers = await signS3Get(path, config.public.s3AccessKey, config.public.s3SecretKey)
return $fetch<Blob>(`/api${path}`, { headers, responseType: 'blob' })
}
async function getObjectText(bucket: string, key: string): Promise<string> {
return get(`/${bucket}/${key}`)
}
@@ -43,5 +49,5 @@ export function useS3Client() {
await $fetch(`/api${encodeCanonicalPath(path)}`, { method: 'DELETE', headers })
}
return { listBuckets, listObjects, downloadObject, getObjectText, uploadObject, deleteObject }
return { listBuckets, listObjects, downloadObject, downloadAuditLogs, getObjectText, uploadObject, deleteObject }
}