mirror of
https://github.com/Sebclem/hassio-nextcloud-backup.git
synced 2024-11-26 19:06:55 +01:00
15 lines
339 B
TypeScript
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();
|
|
}
|