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}/toggle`, params);
};

export const changePassword = async (params: ChangePasswordType) => {
  await axios.patch(`/auth/change-password`, params);
};
