Cleanup command

Signed-off-by: FTCHD <144691102+FTCHD@users.noreply.github.com>
This commit is contained in:
FTCHD
2025-08-13 00:11:33 +02:00
parent 7e5d350676
commit ff75f1bc58
4 changed files with 69 additions and 2 deletions
+15
View File
@@ -109,6 +109,21 @@ export async function deleteRemote(remote: string) {
// console.log(JSON.stringify(r, null, 2))
}
export async function cleanupRemote(remote: string) {
console.log('[cleanupRemote]', remote)
const r = await fetch(`http://localhost:5572/operations/cleanup?fs=${remote}&_async=true`, {
method: 'POST',
headers: getAuthHeader(),
})
if (!r.ok) {
throw new Error('Failed to start cleanup job')
}
// console.log(JSON.stringify(r, null, 2))
}
export async function getMountPoints() {
console.log('[getMountPoints]')