ng / frontend /src /api /setting.ts
epii-1
222222
f0953a4
raw
history blame contribute delete
503 Bytes
import request from "@/utils/request";
import type { GlobalSettingAttributes, UserSettingAttributes } from "@/types";
export const settingApi = {
getSetting: () => {
return request.get<{
userSettings: UserSettingAttributes;
globalSetting: GlobalSettingAttributes;
}>("/api/setting/get");
},
saveSetting: (data: {
userSettings: UserSettingAttributes;
globalSetting?: GlobalSettingAttributes | null;
}) => {
return request.post("/api/setting/save", data);
},
};