Files
filebrowser/frontend/src/api/settings.js
T
2025-03-09 11:13:57 -05:00

16 lines
354 B
JavaScript

import { fetchURL, fetchJSON } from "./utils";
import { getApiPath } from "@/utils/url.js";
export function get(property="") {
const path = getApiPath("api/settings", { property });
return fetchJSON(path);
}
export async function update(settings) {
await fetchURL("api/settings", {
method: "PUT",
body: JSON.stringify(settings),
});
}