import {UpdateUserVariables} from "@/components/forms/department/update/UpdateDepartmentMemberForm";
import privateApi from "../http/privateCall.axios";

export async function getSingleUser(id: string) {
  return await privateApi.get(`/user/get/single/${id}`).then((res) => res.data);
}
export async function updateUser({data, id}: UpdateUserVariables) {
  return await privateApi
    .put(`/user/update/${id}`, data)
    .then((res) => res.data);
}

export async function logoutUser() {
  return await privateApi.post(`/auth/logout`).then((res) => res.data);
}
export async function userLogin(data: {username: string; password: string}) {
  return await privateApi.post(`/auth/login`, data).then((res) => res.data);
}
