2021-03-21 12:51:58 +01:00
|
|
|
import { fetchURL, fetchJSON } from "./utils";
|
2019-01-05 16:12:09 +00:00
|
|
|
|
2021-03-21 12:51:58 +01:00
|
|
|
export function get() {
|
|
|
|
|
return fetchJSON(`/api/settings`, {});
|
2019-01-05 16:12:09 +00:00
|
|
|
}
|
|
|
|
|
|
2021-03-21 12:51:58 +01:00
|
|
|
export async function update(settings) {
|
2022-05-04 12:11:36 +00:00
|
|
|
await fetchURL(`/api/settings`, {
|
2021-03-21 12:51:58 +01:00
|
|
|
method: "PUT",
|
|
|
|
|
body: JSON.stringify(settings),
|
|
|
|
|
});
|
2019-01-05 16:12:09 +00:00
|
|
|
}
|