mirror of
http://88.130.71.182:3000/BlitTech/badoHair_fe.git
synced 2026-06-13 10:41:11 +00:00
Update May 12 by Elvis
This commit is contained in:
15
lib/api/settings.ts
Normal file
15
lib/api/settings.ts
Normal 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 });
|
||||
}
|
||||
Reference in New Issue
Block a user