Update May 12 by Elvis

This commit is contained in:
belviskhoremk
2026-05-12 00:28:37 +00:00
parent b32a70cd0e
commit c4450c993b
37 changed files with 3749 additions and 600 deletions

15
lib/api/settings.ts Normal file
View File

@@ -0,0 +1,15 @@
import { api } from "@/lib/api";
export interface StoreSetting {
key: string;
value: unknown;
updated_at: string;
}
export async function adminGetSettings(): Promise<StoreSetting[]> {
return api.get<StoreSetting[]>("/admin/settings");
}
export async function adminUpdateSetting(key: string, value: unknown): Promise<StoreSetting> {
return api.put<StoreSetting>(`/admin/settings/${key}`, { value });
}