--------- Co-authored-by: Joep <jcbuhre@gmail.com> Co-authored-by: Omar Hussein <omarmohammad1951@gmail.com> Co-authored-by: Oleg Lobanov <oleg@lobanov.me>
13 lines
278 B
TypeScript
13 lines
278 B
TypeScript
import { fetchURL, fetchJSON } from "./utils";
|
|
|
|
export function get() {
|
|
return fetchJSON<ISettings>(`/api/settings`, {});
|
|
}
|
|
|
|
export async function update(settings: ISettings) {
|
|
await fetchURL(`/api/settings`, {
|
|
method: "PUT",
|
|
body: JSON.stringify(settings),
|
|
});
|
|
}
|