Function
deleteFilesByPaths
(data: { file_paths: string[] })
Source from the content-addressed store, hash-verified
| 114 | } |
| 115 | |
| 116 | export async function deleteFilesByPaths(data: { file_paths: string[] }): Promise<void> { |
| 117 | const promises = data.file_paths.map(async (filePath) => { |
| 118 | try { |
| 119 | await fetch(apiUrl(filePath), { method: 'DELETE' }); |
| 120 | } catch { |
| 121 | // silently ignore |
| 122 | } |
| 123 | }); |
| 124 | await Promise.all(promises); |
| 125 | } |
| 126 | |
| 127 | /** |
| 128 | * Search files by query string (filename match). |
Callers
nothing calls this directly
Tested by
no test coverage detected