8 lines
260 B
TypeScript
8 lines
260 B
TypeScript
import type { AppSettings } from "./types";
|
|
|
|
export async function loadSettings() {
|
|
const response = await fetch("/api/settings", { cache: "no-store" });
|
|
const data = (await response.json()) as { settings: Partial<AppSettings> };
|
|
return data.settings;
|
|
}
|