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

21 lines
468 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();
}