mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-20 12:51:33 +03:00
7532b558c7
* feat: add user user identity table * feat: add user openai api key input * feat: add encryption missing message * chore: log more details about 422 errors * docs(API): update api creation path * feat: use user openai key if defined
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),
|
|
};
|
|
};
|