Files
danak-console/src/pages/setting/service/SettingService.ts
T
2025-02-03 14:37:40 +03:30

16 lines
490 B
TypeScript

import axios from "../../../config/axios";
import { ChangePasswordType, UpdateSettingType } from "../types/SettingTypes";
export const getSettings = async () => {
const { data } = await axios.get(`/settings`);
return data;
};
export const updateSettings = async (params: UpdateSettingType) => {
await axios.patch(`/settings/${params.id}/update`, params);
};
export const changePassword = async (params: ChangePasswordType) => {
await axios.post(`/settings/password`, params);
};