16 lines
490 B
TypeScript
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);
|
|
};
|