mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-14 21:21:56 +03:00
322ee318be
* feat(user_management): added user management * feat(user_management): added user management * feat(user_management): removed print * feat: use tanstack query for user data fecthing * feat: add getUser to sdk * feat: improve user page ux use tanstack query * feat: fetch models from backend on brains settings page * feat: update model selection on chat page * feat: update tests --------- Co-authored-by: mamadoudicko <mamadoudicko100@gmail.com>
22 lines
621 B
TypeScript
22 lines
621 B
TypeScript
import { useAxios } from "@/lib/hooks";
|
|
|
|
import {
|
|
getUser,
|
|
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),
|
|
getUser: async () => getUser(axiosInstance),
|
|
};
|
|
};
|