quivr/frontend/lib/api/user/useUserApi.ts

20 lines
561 B
TypeScript
Raw Normal View History

import { useAxios } from "@/lib/hooks";
import {
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),
};
};