mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-20 04:42:18 +03:00
20 lines
561 B
TypeScript
20 lines
561 B
TypeScript
|
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),
|
||
|
};
|
||
|
};
|