✨ Add audit log CSV download
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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 }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user