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

15 lines
339 B
TypeScript
Raw Normal View History

2022-10-24 22:58:19 +02:00
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();
}