hassio-nextcloud-backup/nextcloud_backup/frontend/src/services/ConfigService.ts
2024-08-13 16:42:58 +02:00

15 lines
339 B
TypeScript

import type { WebdavConfig } from "@/types/webdavConfig";
import kyClient from "./kyClient";
export function getWebdavConfig() {
return kyClient.get("config/webdav").json<WebdavConfig>();
}
export function saveWebdavConfig(config: WebdavConfig) {
return kyClient
.put("config/webdav", {
json: config,
})
.json();
}