2023-08-01 10:24:57 +03:00
|
|
|
import { useAxios } from "@/lib/hooks";
|
|
|
|
|
|
|
|
import {
|
2023-09-13 14:47:12 +03:00
|
|
|
getUser,
|
2023-08-01 10:24:57 +03:00
|
|
|
getUserIdentity,
|
|
|
|
updateUserIdentity,
|
|
|
|
UserIdentityUpdatableProperties,
|
|
|
|
} from "./user";
|
|
|
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
|
|
export const useUserApi = () => {
|
|
|
|
const { axiosInstance } = useAxios();
|
|
|
|
|
|
|
|
return {
|
|
|
|
updateUserIdentity: async (
|
|
|
|
userIdentityUpdatableProperties: UserIdentityUpdatableProperties
|
|
|
|
) => updateUserIdentity(userIdentityUpdatableProperties, axiosInstance),
|
|
|
|
getUserIdentity: async () => getUserIdentity(axiosInstance),
|
2023-09-13 14:47:12 +03:00
|
|
|
getUser: async () => getUser(axiosInstance),
|
2023-08-01 10:24:57 +03:00
|
|
|
};
|
|
|
|
};
|