hassio-nextcloud-backup/nextcloud_backup/frontend/src/services/webdavService.ts

31 lines
634 B
TypeScript
Raw Normal View History

2022-10-26 15:34:45 +02:00
import type { WebdavBackup } from "@/types/webdav";
import kyClient from "./kyClient";
export function getAutoBackupList() {
return kyClient.get("webdav/backup/auto").json<WebdavBackup[]>();
}
export function getManualBackupList() {
return kyClient.get("webdav/backup/manual").json<WebdavBackup[]>();
}
2022-11-14 14:23:15 +01:00
export function deleteWebdabBackup(path: string) {
return kyClient
.delete("webdav", {
json: {
path: path,
},
})
.text();
}
2024-07-22 17:22:24 +02:00
export function restoreWebdavBackup(path: string) {
return kyClient
.post("webdav/restore", {
json: {
path: path,
},
})
.text();
}